aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickcombobox.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ComboBox: add implicitContentWidthPolicyMitch Curtis2020-07-161-3/+175
| | | | | | | | | | | [ChangeLog][Controls][ComboBox] Added implicitContentWidthPolicy, which controls how the implicitContentWidth of the ComboBox is calculated. This can be used to automatically ensure that text is not elided. Fixes: QTBUG-78281 Change-Id: If669fa4ef05e5da498992843469000ef39c335ec Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* ComboBox: fix currentValue not being updated on model changesMitch Curtis2020-05-121-6/+6
| | | | | | | | | Make sure we call updateCurrentValue() where necessary. Fixes: QTBUG-83554 Pick-to: 5.15 Change-Id: Iad593c2fc094a26429de1eda91bbdb152ffee2c2 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix -no-accessibility buildPeter Varga2020-05-111-0/+2
| | | | | | Change-Id: Icbae79fd0f48fb9351ee8cc12b35ead7e99b09e2 Pick-to: 5.15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* ComboBox: make pressed read-onlyMitch Curtis2020-05-111-0/+1
| | | | | | | | | | This was planned for Qt 6. [ChangeLog][Controls][ComboBox] The pressed property is now read-only. The down property can be used instead. Change-Id: Ie241a420ac228207b3f564af66d3eb3738f6a145 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove the remaining usages of QRegExp and QRegExpValidatorLars Knoll2020-03-191-10/+10
| | | | | Change-Id: Iab8e682eeb43b3403eba37f7decb7f7a494ae361 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove old QQuickPalette implementationVitaly Fanaskov2020-03-181-5/+2
| | | | | | | | | | | | | | The existing implementation was removed in order to reduce massive code duplication and simplify color resolving process. Unit tests were fixed accordingly. See related changes in the qtdeclarative module for the further details. [ChangeLog][General] the palette API is a part of QQuickItem now. Change-Id: Ic94ab4632e626c11d9b26f035e2a8a119c9088ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix build failures as a result of QMetaType changes in qtbaseAlexandru Croitor2020-03-121-0/+2
| | | | | | | | | | | | | | | | | | | moc now stores the QMetaType of properties as a result of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 in qtbase, which requires full type information about the property type inside the moc generated source file. Many of the property types were forward-declared, and this resulted in build errors like "invalid application of 'sizeof' to an incomplete type 'QQuickTransition'" Make sure to explicitly include the moc files inside the counterpart .cpp files, so that full information is available from included headers. Fixes: QTBUG-82774 Change-Id: I5971713864992398daed72ce9f6ab866668cf8e1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update the current text after a translator is installedMitch Curtis2020-03-051-0/+8
| | | | | | | | | | This ensures that if the model is updated due to a retranslate that it gets the updated string and the ComboBox shows it correctly. Change-Id: Iecbc18a1051d6db13035b3efa393d9bf97788dd9 Fixes: QTBUG-82020 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-12-301-3/+9
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/controls/data/tst_combobox.qml Change-Id: I8471cdac4397f77a8e58140d58c6b50d3c437928
| * ComboBox: change currentIndex (if applicable) when focus is lostMitch Curtis2019-12-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | When the user enters text into an editable ComboBox that matches the text of an entry in the model, and then tabs out to another item, the currentIndex should be changed to that entry. This brings the behavior of ComboBox in line with QComboBox. Change-Id: Ibb1e201a503704681ebcbc7135d1964cc1f6bbca Fixes: QTBUG-78885 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Respect user-set Accessible.nameMitch Curtis2019-12-031-3/+3
| | | | | | | | | | | | | | | | | | Check if the user has set Accessible.name before setting it to the control's text/title/etc. Fixes: QTBUG-66583 Change-Id: I8b2c8ab3f8a8ae8e76c8e6a241260b7f90eca254 Reviewed-by: Liang Qi <liang.qi@qt.io>
* | ComboBox: add selectTextByMouse propertyMitch Curtis2019-12-121-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-301-2/+2
|\| | | | | | | Change-Id: Icb923b10d2b6c524ebaa8b38c7979b780e3582d4
| * Doc: Fix qdoc warningsVenugopal Shivashankar2019-11-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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-281-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix Editable ComboBox's auto-completion performanceMitch Curtis2019-11-041-77/+9
|/ | | | | | | | | | Now that we can call stringValue()/variantValue() without having to call object() first (see 67ef2583), we get huge performance gains and can remove a lot of the code added in a392194. Fixes: QTBUG-78858 Change-Id: I434d3a9d06c020545b5d2cf6731cb5a030418b71 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* ComboBox: fix performance regressionv5.14.0-beta1Mitch Curtis2019-10-011-24/+95
| | | | | | | | | | | | | | | | | | f4623123 introduced a performance regression by calling delegateModel->object() twice: if (componentComplete) { updateCurrentText(); updateCurrentValue(); } We can avoid this by introducing versions of these functions that take the delegate model object as a parameter in order to cache it between calls. Change-Id: I5f9041a8ff00b53e04d759f38677bd87c748f8d1 Fixes: QTBUG-76029 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-061-19/+18
|\ | | | | | | Change-Id: Ie9314e1a5daa20cee9d95a3c42873dbe515b3333
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-061-18/+17
| |\ | | | | | | | | | Change-Id: I859406dc779e59ee5d8e2980e04f8be28b1a69aa
| | * ComboBox: document the behavior surrounding the accepted() signalMitch Curtis2019-09-061-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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: Replace the "Qt Quick Controls 2" instancesVenugopal Shivashankar2019-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-131-0/+1
|\| | | | | | | | | | | Change-Id: I76bfa11f39261e03b52ad237a09ff623bc865e0f
| * | QQuickComboBox: emit countChanged signal when model is updatedWang Chuan2019-07-111-0/+1
| |/ | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][QQuickComboBox] countChanged signal now will be emitted when a new model is set to the ComboBox Fixes: QTBUG-75972 Change-Id: Ic26718453ba06ba284ac5903fc6f55ddf3523331 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-111-3/+3
|\| | | | | | | Change-Id: I2d9537a060ecbed1cc51dbebcc20b09753e41330
| * Doc: fix currentText link, add more \sa linksMitch Curtis2019-05-021-3/+3
| | | | | | | | | | Change-Id: Ibde952a165c9e0fb40133ce554e90ba35c93feee Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | quicktemplates2: Fix compilationFriedemann Kleint2019-05-031-1/+1
| | | | | | | | | | | | | | | | | | After qtdeclarative/325e6305b418ffe1dfb9a36c2516c6a8a3de5733, QML models are in a new module. Change-Id: Ifa98380d4febd212628fb4007a3cc9dce98c995b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add valueRole API to ComboBoxMitch Curtis2019-04-231-21/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-161-5/+5
|\| | | | | | | Change-Id: Ica87b5aac6a7ca335acd9c5da998cc1831347420
| * QQuickComboBox: don't hide popup if focusedAlberto Mardegan2019-04-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The ComboBox popup should be closed when the ComboBox loses focus, but not if the control gaining focus is the popup itself. While all the styles implemented in this module implement the ComboBox popup as an unfocusable window and handle all the keyboard events in QQuickComboBox itself, the developer can choose to replace the popup with a custom implementation, which might need the keyboard focus. Fixes: QTBUG-74661 Change-Id: I838ab9cb697df63ea2099e68f1ae99eadb06be08 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | Fix broken buildMitch Curtis2019-04-031-1/+1
|/ | | | | | | | | | | | | - Remove the override keyword from QQuickComboBoxDelegateModel::stringValue() as the function is no longer virtual, and a change in dev will fix this properly once a qt5.git submodule update happens. - Temporarily skip any failing ComboBox tests that result from the previous step. Task-number: QTBUG-74919 Change-Id: If57bfbd1c8b253cb9ad3bfad4b5f9b9a271744ab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QQuickComboBox: ensure we don't close popup on iOSRichard Moe Gustavsen2019-03-211-4/+15
| | | | | | | | | | | | | | | | | | | | On iOS (and Android), we give focus to a control on touch release (rather than on touch begin, which is normal on desktop). For a QQuickCombobox, this means that we will both handle focus and open the popup on touch release, and not focus on touch begin and open popup on touch release, like on desktop. Because of this, we need to be more careful about when we choose to close the popup as well, otherwise it will close down before it gets a chance to show on iOS. This patch will check why we lose focus on both the inner line edit and the combobox itself, and based on this, choose whether we should close the popup. Basically, if focus is just transferred between the popup button and the line edit, we choose to keep the popup open. Fixes: QTBUG-70161 Change-Id: Iec242c0b5570844868085480fdf96fc49d189b82 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickComboBox: update QRegularExpression wildcard codeSamuel Gaist2018-12-171-1/+1
| | | | | | | | | | Following the update of qtbase because of QTBUG-72539, the code using wildcardToRegularExpression must be updated as anchoredPattern is not needed anymore. Task-number: QTBUG-72539 Change-Id: I51c895560866079c9cc27fa076e29fa4546ecf8f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Port QQuickComboBox to QRegularExpressionSamuel Gaist2018-12-041-5/+12
| | | | | | | | This patch updates the QQuickComboBox code to use QRegularExpression in place of QRegExp which is to be considered deprecated. Change-Id: I6551fac80b071073e3cd09d2016ef99df510e8ff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: rename themeFont() and themePalette()J-P Nurmi2018-05-221-2/+2
| | | | | | | We don't have the conflicting virtual getters anymore. Change-Id: Ia20bfa0a0b1aa67c35a23270eb0241018f8e0ada Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-05-071-46/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quicktemplates2/qquickabstractbutton_p_p.h src/quicktemplates2/qquickcombobox.cpp src/quicktemplates2/qquickcontainer.cpp src/quicktemplates2/qquickcontrol.cpp src/quicktemplates2/qquickcontrol_p_p.h src/quicktemplates2/qquickdialog_p_p.h src/quicktemplates2/qquickdialogbuttonbox.cpp src/quicktemplates2/qquickdialogbuttonbox_p_p.h src/quicktemplates2/qquickdrawer.cpp src/quicktemplates2/qquickmenubar.cpp src/quicktemplates2/qquickmenubar_p_p.h src/quicktemplates2/qquickpage.cpp src/quicktemplates2/qquickpage_p_p.h src/quicktemplates2/qquickpane.cpp src/quicktemplates2/qquickpane_p_p.h src/quicktemplates2/qquickpopup.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquickrangeslider.cpp src/quicktemplates2/qquickscrollview.cpp src/quicktemplates2/qquickslider.cpp src/quicktemplates2/qquickspinbox.cpp src/quicktemplates2/qquickswipeview.cpp src/quicktemplates2/qquicktabbar.cpp src/quicktemplates2/qquicktextarea_p_p.h src/quicktemplates2/qquicktextfield_p_p.h src/quicktemplates2/qquicktheme_p.h Change-Id: I6e2b8fe99e51e3e26c87546aa66af045bc429ec4
| * Templates: use C++11 default member initializationJ-P Nurmi2018-05-041-46/+19
| | | | | | | | | | | | | | | | | | | | | | The code is more readable and less error-prone (this patch caught a few uninitialized members) when the members are initialized in the same place where they are declared. In many cases, empty default destructors can be entirely removed, and we get faster implicitly declared inline default constructors defined by the compiler. Change-Id: I14c5448afc901f9b2ac5965f28c1c26c0b646c08 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Document the default value of ComboBox's currentIndex propertyMitch Curtis2018-05-021-0/+2
| | | | | | | | | | Change-Id: I60dbf84127c800a5f0590ae46c4be3ece7ca3141 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-281-3/+15
|\| | | | | | | Change-Id: I6d731149b21d02164220f6cdc485d9e4ae31bd13
| * ComboBox: don't block the escape/back key (with fixed test)J-P Nurmi2018-04-251-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Accept Key_Escape or Key_Back only if it actually close the popup. If the popup is not visible, the key is not handled, and the event should therefore propagate (and potentially close the app on Android). Note: def92f7 had a broken test (didn't take the popup exit transition into account) and thus, blocked the CI and got rejected in 110b718. Task-number: QTBUG-67684 Change-Id: I46b4731b3006721f3737cf909fbd97331ac6d8ed Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * Revert "ComboBox: don't block the escape/back key"Liang Qi2018-04-251-5/+3
| | | | | | | | | | | | | | | | | | | | This change got integrated by sick COIN. This reverts commit def92f7b657ee9247beffffcb0cadd1eca8be3c6. Task-number: QTBUG-67930 Change-Id: I541579d7112ba386b227b7892d4e0aa8e2bd4edf Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * ComboBox: don't block the escape/back keyJ-P Nurmi2018-04-231-3/+5
| | | | | | | | | | | | | | | | | | | | Accept Key_Escape or Key_Back only if it actually close the popup. If the popup is not visible, the key is not handled, and the event should therefore propagate (and potentially close the app on Android). Change-Id: Ibdb0cab8e0ac47005c5112f7ca4882288f1f5a17 Task-number: QTBUG-67684 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * ComboBox: reset when hiddenJ-P Nurmi2018-04-231-0/+10
| | | | | | | | | | | | | | | | Close the popup and reset the pressed state. Same as in focusOutEvent(). Task-number: QTBUG-67684 Change-Id: I51143175b0f90f3edd116723481faed6ac6e7988 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | ComboBox: add implicitIndicatorWidth|HeightJ-P Nurmi2018-04-181-0/+74
| | | | | | | | | | | | | | | | | | | | Basically same as 704625a0 for AbstractButton. [ChangeLog][Controls][ComboBox] Added implicitIndicatorWidth and implicitIndicatorHeight properties. Change-Id: I1bc9da1ee7ea99dc04ca4458baa06702a4612628 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devJ-P Nurmi2018-03-231-2/+0
|\| | | | | | | | | | | | | | | Conflicts: src/quickcontrols2/qquickstyle.cpp tests/auto/controls/data/tst_popup.qml Change-Id: I7b7bb5f9c63b32eef65c9b2e68f56baa3da69cff
| * Combo|SpinBox: fix wheel event propagationJ-P Nurmi2018-03-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | Sync the behavior with Qt Widgets. Don't propagate wheel events when reaching the end. The behavior was not nice, that a ScrollView underneath started suddenly moving whilst these input controls had input focus. Task-number: QTBUG-66044 Change-Id: I1b9c7f005652041cd82c77d4a1ca1a01d7d536e9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Add QQuickTheme::ScopeJ-P Nurmi2018-03-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | Replace the old enums that were originally copied from QPlatformTheme, including irrelevant entries for DockWidget, MdiSubWindow, MessageBox, with a unified enum that will be matched to cover everything needed for theming fonts and palettes for Qt Quick Controls 2. Task-number: QTBUG-67062 Change-Id: Ia99d092f28c00210c0c7f24d4241eb5a5d9ceb5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-131-3/+8
|\| | | | | | | Change-Id: I32562a4aa6ca3090b28f624d675024f6b717bedb
| * ComboBox: fix key search in the popupJ-P Nurmi2018-03-121-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ComboBox does not change its current index, but highlighted index, when navigating in the popup. If the popup is accepted, the currently highlighted index is applied as the new current index. However, if the popup is rejected, the old current index is kept intact. This is why there is a separation between current and highlighted index. The newly added key search functionality (added together with ComboBox::editable) was missing a check whether the popup is visible. It was unconditionally changing the current index, which lead to a wrong behavior when the popup was open. Task-number: QTBUG-61348 Change-Id: Ic0295db609495ccefbccb7c425a817926786014e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-101-1/+2
|\| | | | | | | Change-Id: Id5cd236e14238612647f7a897886be0202863132
| * Doc: add a "Focus Management in Qt Quick Controls 2" pageMitch Curtis2018-03-061-1/+2
| | | | | | | | | | | | | | | | This will list each control that is a focus scope, and have some relevant information about focus in Qt Quick Controls 2. Change-Id: I3126452bf73f7d7730d0522d616d61ad0da0dd74 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>