aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-168-5/+8
|\| | | | | | | Change-Id: I932a1b1606975265e6affd50e161e58737404a0d
| * Make ToolTips wrapMitch Curtis2019-11-155-5/+5
| | | | | | | | | | | | | | | | Otherwise the text will go outside the window. Change-Id: I3d50a195b1ee6c9b5d49952ef6c49d17c61372fa Fixes: QTBUG-62350 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * SwipeView: fix issue where child items couldn't get focusMitch Curtis2019-11-153-0/+3
| | | | | | | | | | | | | | | | | | Set the focus property of the contentItem (ListView) to the focus property of the SwipeView itself. Change-Id: Ic410f7fb8db9fbb758b956dfe07e1b4265f5f687 Fixes: QTBUG-62401 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-091480-0/+7
|\| | | | | | | Change-Id: Ib14b8c77cefe7aaf5b11483d9a30b2ef05314598
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-081-0/+7
| |\ | | | | | | | | | Change-Id: I551670d92af2bc96d5d8b8724bf5b280e94498c7
| | * Doc: advise against naming root resource dirs the same as style namesMitch Curtis2019-11-071-0/+7
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-59330 Change-Id: Ie983f27f2eca0bc9c906fb7bcfe9e077616ef88b Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14v5.14.0-beta3Qt Forward Merge Bot2019-11-051479-0/+0
| |\| | | | | | | | | | Change-Id: I4b970036bdb5d312b0dc5cb1bcbd8e161e3d4c7e
| | * Run optipng on all imagesMitch Curtis2019-11-041479-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | find . -name "*.png" -exec optipng -o 7 -strip all {} \; Change-Id: I2238b2dd38813d33ed48d79817f872f922cfa28d Fixes: QTBUG-79275 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-021-1/+1
|\| | | | | | | | | | | Change-Id: Ida6e83517802b1e970f755b2e2128b77f08a8d11
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-261-1/+1
| |\| | | | | | | | | | Change-Id: I5da24592eb292ef4f430d734fec234166ce6e1e3
| | * Docs: Update qmlmodule to use QtMinorVersion so that this version is always ↵Kavindra Palaraja2019-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | up to date Fixes: QTBUG-76077 Change-Id: Ica06051a8ca5dc3858110f5eef47fec20bd2d2c1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-265-5/+1075
|\| | | | | | | | | | | Change-Id: If43d5edea9ec0d4beaa3336b3e9aeefc698c5e6b
| * | Update plugins.qmltypes for 5.14Kai Koehne2019-10-215-5/+1075
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-78690 Change-Id: I0e421232f4335a7a351562f23134eccdd0b1c674 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Simon Hausmann2019-10-182-14/+28
|\| | | | | | | | | | | Change-Id: I0b6bd9acd2262ae87e1086a0450875a8f04a0423
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-122-14/+28
| |\| | | | | | | | | | Change-Id: I0b00323007dc02adf98dc581e2694e44b298da29
| | * Universal: disable wrapping for TabBarMitch Curtis2019-10-111-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wrapping behavior makes for a poor user experience. Use ListView as other styles do. [ChangeLog][Universal][TabBar] Disabled wrapping. The Universal style TabBar now behaves like TabBar from other styles. Change-Id: I0a37490cdc2b81ff864ec682256f469a1a930628 Fixes: QTBUG-50027 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * Imagine: fix crash when switching between 9-patch and regular imageMitch Curtis2019-10-021-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider the following changes in source: normal.png => press.9.png => normal.png => focus.png If the last two events happen quickly, pixmapChange() can be called twice with no call to updatePaintNode() inbetween. On the first call, resetNode will be true (because ninePatch is not null since it is still in the process of going from a 9-patch image to a regular image), and on the second call, resetNode would be false if we didn't have this check. This results in the oldNode never being deleted, and QQuickImage tries to static_cast a QQuickNinePatchImage to a QSGInternalImageNode. Only change resetNode when it's false; i.e. when no reset is pending. updatePaintNode() will take care of setting it to false if it's true. Change-Id: I614c172c3e24fda2506f081f8fcdb6acd1c65fb8 Fixes: QTBUG-78790 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-122-2/+2
|\| | | | | | | | | | | Change-Id: I342393f83eab161df8ad6323051c5fadb4cf9ddc
| * | Minor performance improvements suggested by clang-tidyAlbert Astals Cid2019-10-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Add const & to function parameters * Add const & to variables assigned from functions that return const & Change-Id: Ibf35e54ffb78f164493222125411f2ba279cb861 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-09-0729-172/+176
|\| | | | | | | | | | | Change-Id: I23522a8f71cea8d8e3f0155dad98e41c003774fb
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-0630-173/+222
| |\| | | | | | | | | | Change-Id: Ie9314e1a5daa20cee9d95a3c42873dbe515b3333
| | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-061-0/+45
| | |\ | | | | | | | | | | | | Change-Id: I859406dc779e59ee5d8e2980e04f8be28b1a69aa
| | * \ Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-311-1/+1
| | |\ \ | | | | | | | | | | | | | | | Change-Id: Ia89d3600269126768ede2305dcf60d968f772fb7
| | * | | Doc: Fix the qhp project nameVenugopal Shivashankar2019-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1abdfe5d5 renamed the doc module without the version no. 2 in the name, but a bug was left behind. The qhp.project name was still called QtQuickControls2, while all the qhp settings in the qdocconf were using QtQuickControls. Task-number: QTBUG-77815 Change-Id: I1e8d10212798a1f4dfedcd7888f846e149851d23 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * | | Doc: Replace the "Qt Quick Controls 2" instancesVenugopal Shivashankar2019-08-2229-173/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that Controls 1 is deprecated, it's ideal to use "Qt Quick Controls" instead of "Qt Quick Controls 2". Task-number: QTBUG-70333 Change-Id: Ie745db4b61071ddb5e06150d4e739cda74c59f41 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | | Adapt to new Connections syntaxUlf Hermann2019-09-063-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-77734 Change-Id: I22b0c6a46e10780e02c56c250356f1aa87d1050f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.12' into 5.15Liang Qi2019-09-062-1/+46
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| | Change-Id: If5c2806e52efc9608e476c3f068ee5a0e67ffff7
| * | | ComboBox: document the behavior surrounding the accepted() signalMitch Curtis2019-09-061-0/+45
| | |/ | |/| | | | | | | | | | | | | | | | | | | Change-Id: I65be8e54ded284d2f80b5a1f301b75223bd81bb3 Fixes: QTBUG-75338 Reviewed-by: Henning Gründl <henning.gruendl@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Doc: Rename section title for 'TabBar'Topi Reinio2019-08-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Having a section title identical to a QML type name caused links intended to go to the QML reference to link to this page instead. Fixes: QTBUG-77840 Change-Id: I06219a67fd384c51be6080ef7ef8579b6a405d0d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Enable Material style with RHILaszlo Agocs2019-07-253-0/+29
| | | | | | | | | | | | | | | Change-Id: I9100d20b76b9cc6ac138f474e5d808db19ed6684 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Remove redundant codeVitaly Fanaskov2019-07-191-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasons: 1) Qt::TexturePattern has never set by any code (this branch is unreachable); 2) There is no knowleage about any brushes in QML (this method is supposed to be invoked from QML only). Palette is used for colors only; 3) Even if brush style has been set somehow, it will be erased during palettes resolving process after assigning a new "window color". Looks like this code was copied from widgets styling and has been compiling only because of the current design. In light of redesigning palette class this code also makes no sense. Bringing knowledge about brushes and its styles to QML requires additional job. Change-Id: I555d062335593ad945b024136750dcd548cd9f16 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-131-0/+1
|\ \ \ | | |/ | |/| | | | Change-Id: I76bfa11f39261e03b52ad237a09ff623bc865e0f
| * | Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-07-091-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-74391 Change-Id: I354049c5c8edb36cb94afa4483ae177a736f2374 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-044-5/+6
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib55ecb95e5ae47cc7a46f136a2f2eb158676ea34
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-044-5/+6
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/accessibility/tst_accessibility.cpp Change-Id: I0bc187e2a8edb4e357c1bf114dd9b1977d5c1e45
| | * Doc: Fix documentation warnings for Qt Quick Controls 2Topi Reinio2019-01-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The correct module header name is QtQuickControls2 - Add dependency to qtgraphicaleffetcs - RangeSlider: Move \qmlsignal commands out of \qmlpropertygroup - Fix linking to content[Width|Height] for ScrollView Change-Id: I1636fef5f4365a8e9f80b0b8df17e78999bfd3f8 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Material: account for accent color in flat highlighted button's rippleKonstantin Ritt2019-05-211-2/+1
| | | | | | | | | | | | | | | | | | | | | According to https://material.io/design/components/buttons.html#text-button Change-Id: Ia36a676864a8f738d204cf8db9430b797f1f2f99 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * doc - use the correct attributions fileKavindra Palaraja2019-05-201-1/+1
| | | | | | | | | | | | | | | Change-Id: Ib83e2ec925e0c37b40562aea7f11e09759ce3abc Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | * CursorDelegate: stop cursor timer when interval is set to 0Richard Moe Gustavsen2019-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cursor flash iterval can sometimes be set to 0. This is done from e.g the iOS plugin while selecting text, since the cursor should not flash when the user is dragging it around inside a magnifier glass. Setting the interval to 0 simply means "don't flash", rather than "hide the cursor". But setting the interval of a QML Timer to 0 will cause it to never trigger, which is not what we want, since then the cursor can end up staying hidden if done in-between two "flashes". This patch will add an extra condition that checks for this case. Fixes: QTBUG-75844 Change-Id: Ib1ca594a49a18cb161a2b2a67928fb6766984988 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix installation of .png filesJoerg Bornemann2019-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The content of AUX_QML_FILES must consist of valid file paths, not wildcard patterns. The wildcard will produce an invalid installation rule, and since qtbase/20e9422e069a27b7e29b54207447e6ca02b3a55a we're not ignoring installation errors anymore. Fixes: QTBUG-76378 Change-Id: I8498e3559c97cf502cf8b1a5823f1a6775ee2400 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Qualify unqualified id lookup in controlsFabian Kosmale2019-06-1156-169/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparation for https://codereview.qt-project.org/c/qt/qtdeclarative/+/259561 and also avoids walking up the contexts Change-Id: I9f016b7346db088dfe1519924c9770e486b46ec9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Add valueRole API to ComboBoxMitch Curtis2019-04-236-31/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the user to conveniently manage data for a role associated with the text role. A common example of this is an enum stored in a backend with nicely formatted text displayed to the user. Before this patch, developers would have to write code like this: ComboBox { textRole: "text" onActivated: backend.modifier = model[currentIndex].value Component.onCompleted: currentIndex = findValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] function findValue(value) { for (var i = 0; i < model.length; ++i) { if (model[i].value === value) return i } return -1 } } With this patch, the code becomes much simpler: ComboBox { textRole: "text" valueRole: "value" onActivated: backend.modifier = currentValue Component.onCompleted: currentIndex = indexOfValue(backend.modifier) model: [ { value: Qt.NoModifier, text: qsTr("No modifier") }, { value: Qt.ShiftModifier, text: qsTr("Shift") }, { value: Qt.ControlModifier, text: qsTr("Control") } ] } [ChangeLog][Controls][ComboBox] Added valueRole, currentValue and indexOfValue(). These allow convenient management of data for a role associated with the text role. Change-Id: I0ed19bd0ba9cf6b044a8113ff1a8782d43065449 Fixes: QTBUG-73491 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>