aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.10' into ↵v5.15.10-lts-lgplTarja Sundqvist2023-04-246-0/+7
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I1e6656a4356246b153ca4bfb210027ad46242e5a
| * DialogButtonBox: fix buttons going outside box on size changeMitch Curtis2022-04-285-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was removed in c2fd8f7d00e2a47724765e289b828c36c98da29c, but seems to be necessary now. A horizontal ListView's implicitWidth is 0, so setting it to contentWidth seems reasonable regardless. For more history, see 8b78d9cea3091b0bd94d1ae0c71a000f8e7e1903. Fixes: QTBUG-102558 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 2ae87dcece1915797de8065048817707c8f4d24f) Change-Id: I3d67bcd5dbc0297620847f27363acce43a5dc862 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Reset provider's texture if QQuickNiniPatchImage's source is invalidSukyoung Oh2022-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When QQuickNinePatchImage is used as a source of other shader related object like ShaderEffect, OpacityMask or etc., there isn't a implementation to invalidate the provider's texture when QQuickNinePatchImage is invalid. It causes segmentation fault due to dangling pointer. Fixes: QTBUG-100508 Change-Id: I9ea25fe68b41d3b15503e3dccea3a816ad485a20 (cherry picked from commit 81bbd0b45aeb1eb98efd9153c79ebf4f0e4be839) Reviewed-by: <sukyoung.oh@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.5' into ↵v5.15.5-lts-lgplTarja Sundqvist2022-05-194-5/+4
|\| | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: Iec31024aafdb1785574ba6450ca754f4660c05ee
| * Imagine: fix GroupBox's bottom edge being clippedMitch Curtis2021-05-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | Use the actual padding from the nine patch image rather than the hard-coded 12. Fixes: QTBUG-91924 Change-Id: I4707ae173c088625657a135680619cf646e3a9e2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 9a10ab40b7bc3db21f48ff004c5c5525cbfd40de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Change the name of the material style plugin to avoid a path limitAndy Shaw2021-04-232-2/+2
| | | | | | | | | | | | | | | | | | | | On Android 5, the path length limit is low enough that it causes the material style plugin to be too long. So we adjust the name of the plugin to enable it to be loaded without a problem. Change-Id: Id8713d93164ea57cccfff037b074f2e17b351a34 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
| * QmlDesigner: Fix RangeSliderSpecifics snap modeHenning Gruendl2021-04-211-1/+1
| | | | | | | | | | | | | | | | Task-number: QDS-4212 Change-Id: I82d524960a34e9307ddf9b154a326d8fadc7387c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit f42abbcb7794bcfc884e8aee75f73bd9ab8fbda4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/tqtc/lts-5.15.4' into ↵v5.15.4-lts-lgplTarja Sundqvist2022-04-071-1/+13
|\| | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: Ia55f51bc5a14b1b9f55e1ae4123f52d779e24e94
| * Ensure the ninepatch image is detachedLaszlo Agocs2021-04-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | Applied the change to the file at different location in 5.15 as the automatic merge fails. Fixes: QTBUG-88162 Change-Id: Id83d04fce668a3e05d150c086abdecc9d59e51e8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 837b3795c237d20dfca4be46e10697e1cd300e60) Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| * Ninepatch: keep resetNode status to not lose track of ↵Laszlo Agocs2021-04-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | ImageNode->NinePatchNode changes Fixes: QTBUG-87236 Change-Id: Ie8371de8a9d49054c888e4bffb7e89392a6d7c07 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 764b21987e36bc0734b7e8c9aab0e0d25771b56e) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-22368-7718/+7718
|/ | | | | | | | | | | This reverts commit 950f8bff7cbbdbd472234fd32ef659c9d0e8ba7c. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I69e514934864bea3ccd68de9a65fb08e262325a1 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-22368-7718/+7718
| | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtquickcontrols2. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4209 Change-Id: I4175d7a58cb1b04172132a3bc09aea1b065d1778 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Reset the opacity and scale properties after the exit transitionAndy Shaw2021-01-061-4/+4
| | | | | | | | | | | | | | | | By resetting the opacity and scale properties after an exit transition we are ensuring that it does not lose the original values that the user may have set. [ChangeLog][Important Behavior Changes][Popup] After the exit transition is finished, then the opacity and scale properties will be reset to their values before the enter transition is started. Fixes: QTBUG-87283 Change-Id: I2b192c96eaea2906d968341255e80cd19be177e6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit df33c79fb6579f94498164531777320e79c36fd5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlDesigner: Remove duplicate of repeatThomas Hartmann2020-11-102-13/+3
| | | | | | | | | | | The autoRepeat property is already part of AbstractButton. I renamed "Repeat" to "Auto Repeat" Change-Id: I4f22ebc18a2094e67c8f48263f84ab9eb7d497b6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit abb8f124e11ab056be6dc0221d7fdae485febd04) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Material: fix binding loops when binding between attached propertiesMitch Curtis2020-09-032-59/+114
| | | | | | | | | | | | | | | | | | | | | | | | | The paletteChanged signal was used as the change signal for a lot of properties. The problem with this was this binding, for example: Material.foreground: Material.toolTextColor results in foreground being set, which emits paletteChanged. toolTextColor has paletteChanged as its change signal, so that is triggered and then the foreground binding is re-evaluated in the middle of already being evaluated. I haven't found a way to fix this for toolTextColor yet, so we temporarily skip emission of toolTextColorChanged when foreground changes. This means that some text will be the wrong color when foreground is changed after startup. For other properties, using more specific change handlers is enough to solve any binding loops. Task-number: QTBUG-85699 Change-Id: Ied52d4c38914765ed5c75e234954f4baabaaa9af Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 7f29e89c26ae2babc358b1c4e6f965af6ec759f4)
* Remove bindings to parent in delegatesMitch Curtis2020-07-305-5/+5
| | | | | | | | | | | | | | | | Until we've decided whether to a) document that properties of parent should not be bound to in delegates or b) fix the warning that results from doing so after 8c72e634b3b0eacbfdee883bfc34994d3c19ed77, we can pre-emptively clean up a few places where it happens. Task-number: QTBUG-81976 Task-number: QTBUG-82393 Task-number: QTBUG-82989 Change-Id: I1e610613f6016ec1b9cf9ca33cdfb15d384731a8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 456d26e97ec7745fdbd1afaaaa6c1dc217eca060) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: mention cache property in the relevant placesMitch Curtis2020-07-152-0/+3
| | | | | | | | | This was missed in 033564edf5b79e32da63597930e25105a3442f01. Change-Id: I7bc465338d5b9960ad7b746a816cd33efcca1bdc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit feabd686a31d257638d9cdc80c6dd36e8709e279) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove another binding to parentMitch Curtis2020-07-151-1/+1
| | | | | | | | | | | | | | | Similar to what was done in 456d26e97ec7745fdbd1afaaaa6c1dc217eca060. The warning was: Material/ComboBox.qml:68: TypeError: Cannot read property 'Material' of null Task-number: QTBUG-82989 Change-Id: Id82d62d6aca0c0e517d6f8630c51f54739aea95f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f6f42ddc724b9d01cac20632b3fda43a788d53ec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlDesigner: Fix DialSpecifics snap modeHenning Gruendl2020-06-171-1/+1
| | | | | | | | Task-number: QDS-2278 Change-Id: I74be7066b1bf2a0827a3fe7dca7b46e466ef8c58 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit b9bf86f06fafec9c2aace64b05d1a5dfae24ea7e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add missing paletteChanged() to setForeground() in Material styleJoni Poikelin2020-06-081-0/+1
| | | | | | | Change-Id: I7396885688c6091a948f2865ff716e84f7f5195b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit d3fd504b31a531f1bfcd9c3d34991357a36334ce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlDesigner: Update properties in property editorHenning Gruendl2020-04-2712-8/+247
| | | | | | | | | Add missing and cleanup existing properties in property editor. Task-number: QDS-1502 Change-Id: I33259e244d5a4471e01f7fc1845ad05414367eae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Update plugins.qmltypes for 5.15Jani Heikkinen2020-04-155-5/+34
| | | | | | Task-number: QTBUG-82253 Change-Id: I93ae7b51b902050020cf7a79510b8325060181c5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Material: revision sliderDisabledColorv5.15.0-beta4v5.15.0-beta3Mitch Curtis2020-03-311-1/+1
| | | | | | | | | This amends 0d5a43fa8. Cherry-picked from branch: dev Change-Id: I68c500ae874c92467b414dbf37eec9d55b3c730f Reviewed-by: cherrypickbot
* HeaderView: Add support for list based modelsAndy Shaw2020-03-2410-10/+30
| | | | | Change-Id: I411136bd2b9a277d84a7c68c55bb1c317b6cc9d2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-212-4/+4
|\ | | | | | | Change-Id: I9ecddc7a68da4f15ee2c2904e237496eb6a2aa26
| * Doc: Make sure import is highlightedKai Koehne2020-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use \qml ... \endqml to allow qdoc highlighting the import as QML. Also parameterize the example import QtQuick.Templates import so that it always uses the last import version. Change-Id: I3fecc8b301c58a89769caf5aa3a764551ff683b3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Doc: Fix highlighting of importKai Koehne2020-03-091-2/+2
| | | | | | | | | | Change-Id: Ic1f1583d6956180470ddd9d4869ea437c05be343 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Account for the padding around a menu when checking if it is interactiveAndy Shaw2020-03-185-5/+15
| | | | | | | | | | | | | | | | | | | | If there is padding around the menu then it will mean the available height is smaller than the containing item and as such should be interactive. Fixes: QTBUG-82473 Change-Id: Ie3e7568ab66aa3da93e5448c1a27c9bd2a5e486a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: Make Slider's track accent colored and semi-transparentPaweł Gronowski2020-03-171-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | According to the Material Design guidelines Slider's track should be accent colored and semi-transparent. Additionally it should be a bit thicker. The original ticket in the bug tracker mentions it to be 2px 2px but I think that the 4px makes it look a lot more like the one presented in the guidelines (https://material.io/components/sliders/). Task-number: QTBUG-70768 Fixes: QTBUG-70768 Change-Id: I062c0938297ae877b37605b6d536e11b464d477f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: Make RangeSlider's track accent colored and semi-transparentPaweł Gronowski2020-03-171-8/+9
| | | | | | | | | | | | | | To match the Slider's appearance. Change-Id: Ida7a03877c7b8a23508c532dbb275f96bc137742 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: Change RangeSlider's color to grey when not enabledPaweł Gronowski2020-03-171-1/+1
| | | | | | | | | | Change-Id: I0cc390e1a46242ef22bb7d5460701e7b14087ee7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Material: Change slider's color to grey when not enabledPaweł Gronowski2020-03-174-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | When Slider was not enabled it would look exactly the same as when enabled. [ChangeLog][Controls][Material] Add visual distinction between an enabled and not enabled slider. Task-number: QTBUG-70768 Change-Id: If0d7e5adc19d8bc22a810cb2ba4e57b657ab48d4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | HeaderView: set implicitSize on the style itemsv5.15.0-beta2Richard Moe Gustavsen2020-03-1011-24/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By setting an implicit size, the user don't need to set a width or height on a HeaderView himself, but it will get the default size recommended by the style. By doing it the way it's done in the patch we achieve the following: 1. A HeaderView will by default be resized to be the same size as the delegate. 2. If the application sets a size on HeaderView it that is larger than the implicit size of the delegate, the delegate will be resized to have the same size (effectively filling out the free space in the header). 3. If the size of HeaderView is smaller than the implicit size of the delegate, the delegate will simply be clipped. (effectivly saying that the implicitSize of the delegate is also it's minimum size). If this is not acceptable for the application, it will need to use a custom delegate. Since a HeaderView delegate is a component and not an item, it should not be a part of the sanity checks we do to avoid using internal IDs. Hence we blacklist until we have a better way of handling such cases. Task-number: QTPM-1300 Change-Id: I30ca3e13ce5e1371b60f5c4ecf742a7d7e794a36 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Imagine: fix Dial being squishedMitch Curtis2020-03-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | - Since we probably don't want to wrap the background in an Item, use "fillMode: Image.PreserveAspectFit" on it to ensure that the background isn't squished. - Use the same binding for the Translate's y property as we do in all of the other styles. Fixes: QTBUG-82463 Change-Id: I43129959e03ad489a8c231a7a42c192264b380ac Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1Qt Forward Merge Bot2020-02-223-3/+3
|\| | | | | | | Change-Id: Iff02839c8ace49582750e06fa1ea9c559f6c93fe
| * clang-tidy: fix bugprone-integer-divisionMitch Curtis2020-02-193-3/+3
| | | | | | | | | | | | | | | | | | | | | | An example of one of the warnings: qquickfusiondial.cpp:87:15: warning: result of integer division used in a floating point context; possible loss of precision [bugprone-integer-division] Change-Id: I9d225e8149935a8f8dde6e8b0657c1406676b7f1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-02-153-7/+7
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qquickpopup/tst_qquickpopup.cpp Change-Id: Id3bca2da290234f3c69845ffe18c6d9193a1bd28
| * Copy Qt Quick Designer-related files also for static buildsKai Koehne2020-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that the 'designer' directory is copied to the build directory, or installed, also for static builds. This reverts the !static condition introduced to fix a build breakage in 01d076d0e81e5 . Anyhow, I couldn't reproduce the original problem (QTBUG-51708), nor is it clear why it was caused by the static build. Fixes: QTBUG-75682 Change-Id: I47af3907e464d4fd9e9965ac28545b7350f450ee Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Doc: fix RangeSlider errorsMitch Curtis2020-01-281-4/+4
| | | | | | | | | | | | | | | | | | When the RangeSlider was copied into another file as a child item, it would produce errors about first and second being undefined. Change-Id: I0ecc9f6830509183a1b2b35e3faed5f06e78a0ef Fixes: QTBUG-80970 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * set placeholderText by default, not textTim Jenssen2020-01-281-2/+2
| | | | | | | | | | | | | | Task-number: QDS-456 Change-Id: I05b7ce9efab851b99d12ba272a79bf9ba4443398 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add documentation for HorizontalHeaderView and VerticalHeaderViewYulong Bai2020-02-121-0/+123
| | | | | | | | | | | | | | | | | | The example snippet only shows how to lay things out; since TableModel doesn't support declaring header data from QML yet, we also can't show it. Change-Id: Iaf1c4fd39a23be7271d382d743dc30ac459e37cb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Make Fusion style header views look more fusionyMitch Curtis2020-02-122-4/+24
| | | | | | | | | | Change-Id: I659f177ed721b16db7342f37d47d9c062ba2ef97 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Add HorizontalHeaderView and VerticalHeaderViewv5.15.0-alpha1Yulong Bai2020-02-1116-5/+615
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Controls] Add HorizontalHeaderView and VerticalHeaderView. They are controls associated with TableView. Support flicking synchronization Support default, fusion, imagine, material and universal delegate styles. Fixes: QTPM-1300 Change-Id: Ie3f913dd616cda0d4e5a22a3d95baf71692370fe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Upgrade qsb files to version 4Laszlo Agocs2020-01-212-0/+40
| | | | | | | | | | | | | | Also add a compile.bat following the qtdeclarative pattern. Change-Id: Id2350ce6650ca22c1c6403a565c33137ff5a3c64 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-301-1/+1
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/controls/data/tst_combobox.qml Change-Id: I8471cdac4397f77a8e58140d58c6b50d3c437928
| * clang-tidy: fix readability-const-return-typeMitch Curtis2019-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | The warning was: qquickimaginestyle.cpp:46:1: warning: return type 'const QString' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness [readability-const-return-type] Change-Id: Idcabe034f0e38a1b15b406d7bddc4662b6ea2261 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | ComboBox: add selectTextByMouse propertyMitch Curtis2019-12-125-31/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows configuring the selectByMouse property of the underlying TextField for editable combo boxes. Named selectTextByMouse instead of selectByMouse to avoid confusion with selection of the items themselves. [ChangeLog][Controls][ComboBox] Added selectTextByMouse property. Change-Id: I852e4cd44ebe6b2a1ed2535513ea2fc35cbe0a32 Fixes: QTBUG-71406 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-304-10/+13
|\| | | | | | | Change-Id: Icb923b10d2b6c524ebaa8b38c7979b780e3582d4
| * Doc: Fix qdoc warningsVenugopal Shivashankar2019-11-264-10/+13
| | | | | | | | | | | | | | | | | | | | | | The warnings were about: - Undocumented function parameters - Instances of \instantiates that us an internal class - A few link issues Task-number: QTBUG-79827 Change-Id: I60094279c7da6bc446b5c63b7b4924b71cee4672 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Don't delete items we didn't createMitch Curtis2019-11-282-23/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up until this patch, we've always deleted "old" items when a new one is assigned. For example, the style's implementation of contentItem will be destroyed here as it is not accessible by the user and is no longer used: Button { contentItem: Item { /* ... */ } } This was especially important before the introduction of deferred execution, as the "default" items would always be created, regardless of whether the user had overridden it with one of their own items. By deleting the old items, we free unused resources that would otherwise persist until application shutdown (calling gc() does not result in the items being garbage-collected, from my testing). Although this has largely worked without issues, deleting objects that weren't created by us in C++ is not supported. User-assigned items can be created in QML (with JavaScriptOwnership) or C++ (with CppOwnership), and it is up to the user and/or the QML engine to manage the lifetime of these items. After the introduction of deferred execution, it became possible to skip creation of the default items altogether, meaning that there was nothing to delete when assigning a new, user-specified item. This requires that no ids are used in these items, as doing so prevents deferred execution. Assuming that users avoid using ids in their items, there should be no unused items that live unnecessarily until application shutdown. The remaining cases where items do not get destroyed when they should result from the following: - Imperative assignments (e.g. assigning an item to a Button's contentItem in Component.onCompleted). We already encourage declarative bindings rather than imperative assignments. - Using ids in items. Given that these are use cases that we will advise against in the documentation, it's an acceptable compromise. [ChangeLog][Important Behavior Changes] Old delegate items (background, contentItem, etc.) are no longer destroyed, as they are technically owned by user code. Instead, they are hidden, unparented from the control (QQuickItem parent, not QObject), and Accessible.ignored is set to true. This prevents them from being unintentionally visible and interfering with the accessibility tree when a new delegate item is set. Change-Id: I56c39a73dfee989dbe8f8b8bb33aaa187750fdb7 Task-number: QTBUG-72085 Fixes: QTBUG-70144 Fixes: QTBUG-75605 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>