Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.1, 5.7.0
-
None
-
Kubuntu (latest); Windows 7; Android x86 emulator under Win7
-
11ac8a8b598fc79e38339519e52d4fe1a56ddaeb
Description
Quick Controls 2 (and older labs.controls) ComboBox popup listview draws overlapping texts in the rows under some circumstances after the model (inherited from QAbstractItemModel) is changed (reset).
To reproduce run the attached project. Change Camera from Not Selected to e.g. the first one (Auto Detect). Some comboboxes appear (their visibility is bind to their count; this didn't affect the bug). In the background the model for Method etc. is changed. Open Method, there are three items USB/PTP, Servo:CH2, Servo:CH3.
Change Camera to e.g. the next one (Any Uses servo) and the model for Method will be changed. Open Method again, change it. Open it again and the bug should appear. It appears only after the Method popup list is opened once, then model changed, then opened again and something selected. Just changing the model and reopening the popup doesn't trigger it.
I have tried to use model inherited from QStandardItemModel as in the attached code. I also tried to inherit QAbstractListModel with custom API to change the model and send signals to notify about the changes, both add/remove columns and reset, but the result was always the same.
In desktop versions there is such an annoyance that the popup list count remains the longest count of the model even after it has been changed to shorter and the extra rows are empty (or sometimes show an item which doesn't belong to the model). But it doesn't probably affect the bug because it doesn't happen in the Android emulator.
Tested with: Windows 7 desktop; Android x86 emulator; Kubuntu desktop; Qt 5.6 & labs controls; 5.7 & controls 2. (Not all permutations.)
Attachments
For Gerrit Dashboard: QTBUG-54573 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
164404,4 | Fix QQuickComboBox::textAt() | 5.7 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |