aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/basic
Commit message (Collapse)AuthorAgeFilesLines
* Fix QQuickIconLabel action icon color being overridden by style defaultMitch Curtis13 days10-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Styles need a way to set the default icon color for controls. Until now, that was done like this: icon.color: "tomato" contentItem: IconLabel { icon: control.icon } This breaks the use case of e.g. an Action that sets its own icon.color, because the icon property of the control always takes precedence (see 146bc9517c56feda4eba34282d3cc53bd47b6267). This patch adds a defaultIconColor property to IconLabel, which allows styles to specify a color without overriding any potential action's icon: contentItem: IconLabel { icon: control.icon defaultIconColor: "tomato } If icon.color was explicitly set, it is used instead. This does mean that overriding the contentItem will result in the icon color being lost, but that is already the case for style customizations in general. All controls that set icon.color and using IconLabel to display their icon are affected and are therefore adapted: Button, CheckDelegate, DelayButton, ItemDelegate, MenuBarItem, MenuItem, RadioDelegate, RoundButton, SwipeDelegate, SwitchDelegate, TabButton, ToolButton. Add FlowPane to the shared folder of the baseline test and use it in the tests that we touch. This fixes two issues: - Using Pane as the background fixes text being invisible for some styles. - Using Flow provides the most space-efficient layouting of items now that we have more than would fit in the old layout. Task-number: QTBUG-87459 Change-Id: I455ce7202a46b7cfa7545650574e48ad72796675 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Context menus: rename control to editorMitch Curtis2025-11-123-8/+8
| | | | | | | | | | | | | | This better reflects what it is and avoids naming conflicts with the controls themselves. Pick down to 6.9 (where QQuickContextMenu was introduced) to avoid future cherry-pick conflicts. Task-number: QTBUG-133556 Task-number: QTBUG-134903 Pick-to: 6.9 6.10 Change-Id: If0af26c5f16ee56cc909fcc66d1421109786343e Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Change PopupType of textEditingContextMenu for Popup.Item on WaylandFrederic Lefebvre2025-10-311-1/+1
| | | | | | | | | | | | | | | | Use Popup.Item popupType when test is run on Wayland. Remove the need for a transient parent on Wayland that was causing several tests of tst_QQuickTextField to consistently fail. Fix the following failing tests on Ubuntu 24.04 wayland tst_QQuickTextField::contextMenuCopy, contextMenuCut, contextMenuDelete, contextMenuPaste, contextMenySelectAll, releaseAfterPressAndHold, touchscreenDoesNotSelect. Pick-to: 6.10 Change-Id: I5a411dae63ae36361ed83055a1eb4c87de17acae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Set explicit default security level of all files with default securityJan Arve Sæther2025-09-1780-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | The files (folders) already processed are listed in each issue in epic QTBUG-134547 These files were processed half a year ago. In order to make it clear that all of these files are already processed, mark them with an explicit default security header. For the record, this was generated with this script: find -E . -regex ".*\.(cpp|h|hpp|mm|qml|js)$" | xargs python3 ~/bin/add-cra-header.py in the folders listed in each subtask of QTBUG-134547 (add-cra-header.py only exist at my desktop, but it simply adds the default security header if it doesn't already have any existing security header) QUIP: 23 Fixes: QTBUG-134547 Pick-to: 6.10 6.9 6.8 Change-Id: Ieb8c78ea6561fdbdd27c7b13185ece853eedf80f Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* VerticalHeaderViewDelegate: set 6.10 with set_source_files_propertiesMohammadHossein Qanbari2025-08-081-0/+3
| | | | | | | | | | | | Found in 6.10 QML API review amend 9601b74dabed53e93a7a5144d4c1fadb7876db18 Task-number: QTBUG-137478 Pick-to: 6.10 Change-Id: I3a26307f304277dfd259da3736d1069a43c0cd03 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* HorizontalHeaderViewDelegate: set 6.10 with set_source_files_propertiesMohammadHossein Qanbari2025-08-081-0/+3
| | | | | | | | | | | | Found in 6.10 QML API review amend 9601b74dabed53e93a7a5144d4c1fadb7876db18 Task-number: QTBUG-137478 Pick-to: 6.10 Change-Id: I11fcf5317add4c07e211cff70d3b2e86bd470000 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add set_source_files_properties for SearchFieldDilek Akcay2025-08-061-0/+3
| | | | | | | | | | Added set_source_files_properties to configure build settings for SearchField in 6.10. Found in 6.10 QML API review, QTBUG-137478. Pick-to: 6.10 Change-Id: Ieff5ff3c737ee2c9ddd7a261333eea777d7ef03e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* SearchField: Add highlightedIndex and fix ambiguous currentIndex behaviourDilek Akcay2025-07-181-2/+2
| | | | | | | | | | The new highlightedIndex property enables control over the highlighted item in the SearchField. This property follows the same logic and behaviour as the Combobox's highlighted API. Fixes: QTBUG-137862 Pick-to: 6.10 Change-Id: Ifb2a4fd52f126c6ea6b7e36b2b47e4b0f0115428 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Basic style: Add @2x and @3x icon versions for SearchFieldDilek Akcay2025-06-309-0/+6
| | | | | | Pick-to: 6.10 Change-Id: I4b5a0ff11d4aa69a50feda5516dca57bf4abe7d5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Basic style: Improve accessibility with high-contrast colorsMohammadHossein Qanbari2025-06-1735-36/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enhances accessibility by introducing high-contrast visual cues across various controls when high-contrast mode is preferred. Previously, controls in the Basic style did not provide sufficient visual distinction in high-contrast mode. This patch adds a visible contour (border) around controls when high-contrast mode is enabled. For some controls, the contour is added by adjusting the border color and width. For others (e.g., highlighted ComboBox items), a Rectangle is drawn around the control. TextArea and Tumbler controls are also updated accordingly. Separator controls now increase their width or height based on orientation in high-contrast mode for better visibility. ScrollBar and ScrollIndicator controls: - Previously, these controls relied solely on handle color changes, which were insufficient in high-contrast mode. - This patch introduces an optional background and increases the handle's contrast to improve visibility. The patch also ensures that text and border colors adapt to the high-contrast palette, improving legibility and focus indication throughout the controls. Minor adjustments to Menu, Delegate, and Header controls for consistent high-contrast appearance. Task-number: QTBUG-135687 Pick-to: 6.10 Change-Id: I460bd6fa2e48a47f20c2ba053ab453f32de18add Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Introduce SearchField for Quick ControlsDilek Akcay2025-06-014-0/+129
| | | | | | | | | Add a new QQuickSearchField as part of the Qt Quick Controls to simplify implementing search functionality for lists of items. Task-number: QTBUG-126188 Change-Id: I634131161447616a2d66e7f301bd8a24adac2d7f Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Basic style: don't use QColor(QRgb), use QColor::fromRgba() insteadMohammadHossein Qanbari2025-05-261-24/+28
| | | | | | | | | The QColor(QRgb) constructor ignores the alpha channel. To include the alpha channel fromRgba() static function should be used to create the QColor instance Change-Id: I98734084cdcd5df82e8103ddbdb487c4f64c65b4 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Quick Basic Style: remove redundant wrappingMohammadHossein Qanbari2025-04-111-1/+1
| | | | | | | Amends 52141b34ecd16b33e9879fc1047c6f9c3dfde6da Change-Id: I59b4228a3ccbb38ae9fc3defaea12dbda04026a8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Basic Style: Add support for dark mode color schemeMohammadHossein Qanbari2025-04-053-24/+67
| | | | | | | | | | | | | | | | | | | Previously, the basic style did not respect the system's dark mode settings because the palette initialized by QQuickBasicTheme lacked definitions for dark mode colors. This commit updates the palette initialization to dynamically set colors based on the current system color scheme. Additionally, the palette is reinitialized whenever the system color scheme changes. The controls gallery example has been updated to demonstrate the new functionality. [ChangeLog][Controls][Basic] Basic style supports dark mode now. Fixes: QTBUG-135207 Change-Id: I2d6a74b407a7981905a9b86e97004cf0609a4bf0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Controls: Deprecate and remove QQuickBasicStyleMohammadHossein Qanbari2025-04-034-336/+0
| | | | | | | | | | | | | | | The QQuickBasicStyle class is no longer necessary since the Basic style now supports palettes. This class was retained temporarily to allow users who had customized the `.qml` files sufficient time to migrate their changes. Enough time has now passed for migration, making it appropriate to deprecate and remove this class. See also this commit 57f0da5e6464735cedf3f8624deb827b5fe98b53 Task-number: QTBUG-135207 Task-number: QTBUG-63369 Change-Id: Ida7cd3d7bc63d307a1b99d667fdf3ad14f156132 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QuickControls: Add vertical and horizontal header view delegatesMohammadHossein Qanbari2025-03-065-48/+66
| | | | | | | | | | | | | | | | | | | | | | Implement QQuickHeaderViewDelegate as the base class for header view delegates, introducing 'headerView' and 'orientation' properties. Separate previous delegate settings into HorizontalHeaderViewDelegate and VerticalHeaderViewDelegate components for Basic, Fusion, and Imagine styles. This change improves the modularity and reusability of header view delegates across different styles. It also allows for more consistent behavior and easier customization of header views. A test suite has been added to verify default property settings and ensure the new components work without warnings. [ChangeLog][QtQuickControls][HeaderView] Add dedicated delegate components for vertical and horizontal header views. Task-number: QTBUG-70326 Change-Id: I8831e77f6909bdae13c3a7262145ab156f63a59a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* CMake: Avoid leaking Private dependencies for style pluginsAlexandru Croitor2025-02-281-2/+2
| | | | | | | | | | | | | | | Use qt_internal_extend_target instead of target_link_libraries for the Qt Quick style plugins. This wraps their private module dependencies in BUILD_INTERFACE genexes. It avoids leaking the deps to consumers of the style plugins in a static build, where the private modules are not in scope by default. Pick-to: 6.8 6.9 Change-Id: Iac4b9d97c112fa829a60170d7fdad60f97e43f1f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* ContextMenu: add to text editing controlsMitch Curtis2025-02-284-0/+43
| | | | | | | | | | | [ChangeLog][Controls] TextField and TextArea now provide a ContextMenu by default. If you already have a custom context menu for these types, ContextMenu will not open its own on e.g. right click. Fixes: QTBUG-35598 Pick-to: 6.9 Change-Id: I0897a7ba5e1b5b6d5425c80cbc6f2550c904605b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Mark TableViewDelegate as introduced in 6.9Fabian Kosmale2025-02-211-0/+4
| | | | | | | Pick-to: 6.9 Change-Id: I39312a020939f4de5b80e9a0bf4b39294e9fa7f5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: MohammadHossein Qanbari <mohammad.qanbari@qt.io>
* QQuickContextMenuForeign: fix QML_ADDED_IN_VERSION macroMitch Curtis2025-02-181-1/+1
| | | | | | | | | | It should be 6.9, not 6.8. Amends 0794a0e06e40703b191ea3af5ddbb14fafafea8e. Pick-to: 6.9 Change-Id: Ibdeaca9196c36a12668237feda487aab78e88fbd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add ContextMenuMitch Curtis2024-12-241-0/+10
| | | | | | | | | | | | | | | This is an attached type that provides a way to open a context menu in a platform-appropriate manner. [ChangeLog][Controls] Added ContextMenu. ContextMenu can be attached to any item in order to show a context menu upon a platform-specific event, such as a right click or the context menu key. Fixes: QTBUG-67331 Pick-to: 6.9 Change-Id: I225a8f498cc5bc18d36c3dc4cf481ef5ef95cd88 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Take safe areas into account for Qt Quick Controls DrawerTor Arne Vestbø2024-12-191-4/+4
| | | | | | | | | | | When the drawer is pulled in from the side we want it keep its content away from the non-safe areas, while still drawing the background edge to edge. Pick-to: 6.9 Change-Id: Iff145df719f5746cbdb1d3c13494967c5993c6e6 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Compute implicitSize based on implicitContentSize in Popup and subclassesTor Arne Vestbø2024-12-195-10/+10
| | | | | | | | | | | | Popup uses a Pane as its popup item, so now that Pane reflects its explicitly set contentWidth/Height through implicitContentWidth/Height we can use the same expression for implicit width/height as regular controls, which hooks us into the safe area binding loop detection as well. Pick-to: 6.9 Change-Id: I3709978dae0271d7daf44fc6988f09f03df15b1f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Take safe areas into account for Qt Quick Controls ToolBar and MenuBarTor Arne Vestbø2024-12-192-0/+10
| | | | | | | | | | | | | | | A ToolBar and MenuBar is commonly placed in the header/footer/menuBar of an ApplicationWindow, where we don't do any automatic padding to account for the safe area. By adding the safe area margins as padding to the controls, we ensure that the control's background flows into the non-safe area, while the content item of the control (the toolbar or menu bar content) is kept within the safe area. Pick-to: 6.9 Change-Id: I5fad7394beaa01ae8ed142e4e2e42c5bffaab9fa Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Compute implicitSize based on implicitContentSize in Container and subclassesTor Arne Vestbø2024-12-184-8/+8
| | | | | | | | | | | | Now that Container reflects its explicitly set contentWidth/Height through implicitContentWidth/Height we can use the same expression for implicit width/height as regular controls, which hooks us into the safe area binding loop detection as well. Pick-to: 6.9 Change-Id: If0a710a5eb4a35c91d02d7170b5e03e457e6bc12 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Compute implicitSize based on implicitContentSize in Pane and subclassesTor Arne Vestbø2024-12-186-12/+12
| | | | | | | | | | | Now that Pane reflects its explicitly set contentWidth/Height through implicitContentWidth/Height we can use the same expression for implicit width/height as regular controls, which hooks us into the safe area binding loop detection as well. Pick-to: 6.9 Change-Id: Ie31b740a1e405341fc5f0ed9673b213292e4afd9 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Controls: Add TableViewDelegateMohammadHossein Qanbari2024-11-272-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces TableViewDelegate to the Controls module. Key features: - Ready-made delegate assignable to TableView - Handles table drawing using predefined styles - Usable without customization - Implements all required properties set by TableView - Provides API for changing background and label Test Suite: - Verifies TableViewDelegate properties and functionalities - Tests include: - Verification of selected, current, and content text properties - Validation of selection behavior and item clicking BLACKLISTing two tests (dragToSelect and pressAndHoldToSelect), which will be removed from the BLACKLIST in the next patch (to fix cell selection on the Android platform). Implementation derived from TreeViewDelegate, adapted for TableView use. TreeViewDelegate patch: 0ddb0d4b9b0c70c4fd4058ef4660e38fd933523e [ChangeLog][Controls] New delegate added: TableViewDelegate Fixes: QTBUG-114636 Change-Id: Ibb8b0a7622016e0c6fd58d696e507e7bb76daced Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QuickControls.Basic: Add missing dependency entryFabian Kosmale2024-10-091-0/+1
| | | | | | | | | | | | | | Basic needs to depend on Templates, as it reuses the Overlay attached object from there. At runtime, this already works, but tooling needs a hint; otherwise it will only find the uncreatable Overlay type, not the attached one. Fixes: QTBUG-129799 Pick-to: 6.8 Change-Id: I536482cfebfde8a5b61adcc87e3fa2a0b33814ff Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix BusyIndicator being hidden when running is changed quicklyMitch Curtis2024-10-022-2/+11
| | | | | | | | | | | | | | | | If running is set to false and then true within a short period, BusyIndicatorImpl's OpacityAnimator cancels the 1 => 0 animation (which was for running being set to false), setting opacity to 0 and hence visible to false. This happens _after_ setRunning(true) was called, because the properties were set synchronously but the animation is asynchronous. To account for this situation, we only hide ourselves if we're not running by storing and checking our running state. Fixes: QTBUG-85860 Pick-to: 6.5 6.7 6.8 Change-Id: I220dfb78f00028e4a12a92fc14082006e1844002 Reviewed-by: Doris Verria <doris.verria@qt.io>
* Dialog: Hide title if inside a popup windowOliver Eftevaag2024-06-211-1/+1
| | | | | | | | | | | | Popup windows with the Qt::Dialog flag, will display the title in its window decoration. Because of this, it's redundant to also display the title inside the dialog. Pick-to: 6.8 Change-Id: Ib052a950216248c889983361063c8e46f4cffdfa Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Tumbler: fix warnings when swapping contentItemMitch Curtis2024-06-121-4/+5
| | | | | | | | | | | | | | | | | | | Referring to the contentItem property of Tumbler from within the contentItem itself was a way to avoid using ids (which prevent deferred execution). However, the new contentItem may not have a delegateHeight property, so we move the declaration up to the Tumbler itself to ensure that it's always available. Until QTBUG-11984 is implemented, we have to use the "__" prefix to mark the property as "private" and (hopefully) lessen the chance that it will show up in auto-completion within users' IDEs, since it's not part of the public API (this is also why we've historically avoided declaring properties here). Fixes: QTBUG-119647 Pick-to: 6.5 6.7 Change-Id: Ie8646e605b0c7b1e804a6c4da4046613f958e51d Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Vladimir Belyavsky <belyavskyv@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove the use of GENERATE_CPP_EXPORTS argumentAlexey Edelev2024-06-111-1/+0
| | | | | | | | | The behavior that argument was enabling is the default one now. Pick-to: 6.8 Task-number: QTBUG-90492 Change-Id: I11711d4c794f0b22169abb595b8ffad2eeb1300d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* ComboBox: fix popup palette inheritance, part twoMitch Curtis2024-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0ad15c4101889a22bf9ff761e7d20ec515f46514 fixed the colors of ComboBox's popup, but as a drive-by, tried to simplify several bindings to palette properties. For example: background: Rectangle { color: control.palette.window } became: background: Rectangle { color: palette.window } I'm guessing I thought that the standard Item palette propagation would kick in there and so the "control" part wasn't necessary. If ComboBox.qml's popup had a line like this palette.window: "red" then it would work, because the role is explicitly set. By setting a role in QML, QQuickPaletteColorProvider::m_requestedPalette is set for that item (Popup, in the example above). Just having palette: control.palette isn't enough, because no role has been set and hence m_requestedPalette won't be allocated and it will use the default values. This patch restores the previous code to fix the regression. Fixes: QTBUG-125529 Pick-to: 6.5 6.7 6.8 Change-Id: I2103b81a34d9e7f17992d0355befb8b904134db1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* ComboBox: fix popup palette inheritanceMitch Curtis2024-05-081-2/+3
| | | | | | | | | | | | | 54a2a35f17d5e5d1793af63b76993a583e10ab41 fixed the theme/accent/primary inheritance of the Material and Universal style's ComboBox popups. This patch makes an equivalent fix for styles that use palettes. Now the Basic and Fusion ComboBox popups will have the correct colors in both light and dark modes. Fixes: QTBUG-124474 Pick-to: 6.5 6.7 Change-Id: I3e3fcdc9d6fe75f195cc4f4707eac6d30413121f Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Basic.impl: Add dependency entry for QtQuickFabian Kosmale2024-03-261-0/+2
| | | | | | | | | | | | | Types of the module derive from QQuickItem, so it should make the dependency explicit. This will help the QDS code model to find the connection to the correct types. Pick-to: 6.7 6.5 Change-Id: I59137d2d8d5b87f549a7d8dfc74283d21e38c93f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use document imports of QtQuick.Controls.impl, not qmldir-importsMitch Curtis2024-03-153-2/+62
| | | | | | | | | | | | | | | | qmldir-imports are transitive, meaning that we were exposing all types from QtQuick.Controls.impl each time QtQuick.Controls was imported. This patch removes these transitive qmldir-imports by moving the foreign type declarations for QQuickOverlay and QQuickSplitHandleAttached into the Basic style (which is always imported by every style as a final fallback). Task-number: QTBUG-104768 Task-number: QTBUG-123103 Change-Id: Ia0ff778a88a38bb872730e055631dc924456d7be Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Dialogs: Depend on controls styles in QuickDialogs2QuickImplUlf Hermann2024-02-094-12/+21
| | | | | | | | | | | This forces them to be built before, making their qmltypes available to the subsequent build steps. Having the styles as linkable backing libraries also makes their C++ types available to qmlsc's direct mode. Pick-to: 6.7 6.6 Task-number: QTBUG-121643 Change-Id: I24688b325d27f16e7cc77219cf481b3b30ca52a3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QuickControls: Link the impl libraries into the base modulesUlf Hermann2024-02-022-2/+2
| | | | | | | | | | | | | | | This forces the build system to build them before, making the qmltypes files available to the base modules' build steps. The linker might even actually link the libraries and avoid the excessivle plugin loading that way. To encourage that, also drop the pointless NO_PLUGIN_OPTIONAL. Pick-to: 6.7 6.6 Task-number: QTBUG-121643 Change-Id: Ifd9082a5927deac8c9d67edf4104338ddaa35aa5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tst_dialogbuttonbox: fail on warningsVladimir Belyavsky2023-11-291-1/+1
| | | | | | | | | | | | | | | | Enable fail on warnings for all tests in init() method. Fix the warning in DialogButtonBox::test_contentItemDeletionOrder() "DialogButtonBox.qml:14: TypeError: Cannot read property 'contentWidth' of null". With fc4ee77116624c784d8c42f2b8e5dbf2f78b6d89 we can use now the optional chaining for this. Also, as a drive-by change, replace 'var' with 'let' Task-number: QTBUG-98718 Change-Id: I9daf41fb76e297f7a1b8114b0e82c60e396ac7b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_dial: fail on warningsVladimir Belyavsky2023-11-221-3/+4
| | | | | | | | | | | | | Enable fail on warnings for all tests in init() method. Also fix last warnings, like "tst_controls::Basic::Dial::test_nullHandle() qrc:/qt-project.org/imports/QtQuick/Controls/Basic/Dial.qml:43: TypeError: Cannot read property 'width' of null" And finally, as a drive-by change, replace 'var' with 'let' Task-number: QTBUG-98718 Pick-to: 6.6 6.5 Change-Id: I80d0a8319791182a1429e5541c80bdac1131d1c0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove all QML_DECLARE_TYPE from src and toolsUlf Hermann2023-11-182-4/+0
| | | | | | | | They are generally not useful for anything. Change-Id: I12e959ce9338e6eb7465633496c7921fa09a3fe8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Menu: fix contentItem's interactiveMohammadHossein Qanbari2023-11-161-2/+2
| | | | | | | | | | | | | | The interactive property of the Menu's contentItem depends on its Menu (control) when Window.window is valid. In the case of a fixed-height menu, even if the contentItem's height is smaller than Window.window.height, the interactive property of the contentItem would be false if the menu's height is smaller than the window's height and also smaller than its contentItem's height. Fixes: QTBUG-93856 Pick-to: 6.6 6.5 6.2 Change-Id: If95080250c3953d4293a9e1dbcc6225d21ee034f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Basic: fix progress bar color not changing when setMitch Curtis2023-09-131-2/+6
| | | | | | | Fixes: QTBUG-116795 Pick-to: 6.5 6.6 Change-Id: Ic0ede8f2f34feba427e2354d2d8a4a915605a44b Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* TreeViewDelegate: don't use deprecated APIRichard Moe Gustavsen2023-08-151-3/+3
| | | | | | | | | | | | | | | | | TableView.modelIndex(column, row) was deprecated in Qt 6.4 (291d3ed0da) in favor of TableView.index(row, column). But the TreeViewDelegates are still using the deprecated API for the edit delegates (added in Qt 6.5, 21bf976a41), which will cause warning messages to be printed. This patch will rewrite the offending lines in the TreeViewDelegates to use TableView.index(row, column) instead. Pick-to: 6.6 6.5 Task-number: QTBUG-109542 Change-Id: I41c0c18934493611663b759c8eb3b4fed2510cc6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add startAngle and endAngle properties to DialMatthias Rauter2023-04-283-2/+42
| | | | | | | | | | | | | | | | | | | | The start and end angle of the Dial element were hard coded before. Now they can be set by the application developer using the new properties startAngle and endAngle. The angle property is set to an angle between those values, even if it is >360 or <0. The setter functions make sure that the relation between angle and value is unique. Further, values for start and endAngle are limited to [-360, 720]. Wrap works as before. Tests have been updated. All styles have been updated to the new functionality except the Imagine style (see task QTBUG-112387). [ChangeLog][Controls] The start and end angle of the dial element are made customizabe. Fixes: QTBUG-57822 Change-Id: I941837008d4f9b4dde1979e91db5adb624bcbe41 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Controls: Improve various delegatesUlf Hermann2023-03-273-6/+23
| | | | | | | | | Their internal components should be bound, they should use required properties, and they should prefer IDs over the "parent" property. Change-Id: Iac61a4d7b9daf34928a1b41a29658e491e3ac39f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Controls: Remove the model/modelData workaroundsUlf Hermann2023-03-273-7/+3
| | | | | | | | Now that model has modelData as anonymous property and also has useful properties for list models, we can remove the workarounds. Change-Id: I744247821fba3c14e5bfff125daeeb7a3128f3b5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* DialogButtonBox: Fix contentWidth warningsSze Howe Koh2023-02-211-2/+2
| | | | | | | | | | Warning: Property "contentWidth" not found on type "QQuickItem" Task-number: QTBUG-110934 Change-Id: I5c64ebbe1400e02d4a853a2cb69874c0b3ba3252 Pick-to: 6.5 6.4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qmllint: Fix attached property re-use detectionUlf Hermann2023-02-141-0/+2
| | | | | | | | | | | | | | | | | | | | | Move the detection into the QtQuick lint plugin. It's mostly meant for QQC, so let's auto-enable it for attached types derived from QQuickAttachedPropertyPropagator. To this end, two new categories are introduced: The Quick lint plugin gets its own attached-property-reuse category which is synonymous to the default category of the same name. Furthermore, we add a controls-attached-property-reuse category for only checking controls. That one is implied by either of the others. Finally, fix the id vs. scope resolution to actually do something. This way we can give appropriate hints when the outer type has an ID already. Pick-to: 6.5 Fixes: QTBUG-110834 Change-Id: Ib71a9e3bbc10bac77f36db6cc441af88df20fd33 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQuickControls: Disambiguate static constantsFriedemann Kleint2023-02-072-7/+7
| | | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I6e7fbb1d3f33eda50f55257b6df5aaf47170eb57 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>