Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.1
-
None
-
-
b3b28faf2627aad3a0c47fb4c7c711e0d19984aa (qt/qtbase/dev) 3f2b5fdf48e32ee01bcc1154adef5b3c530fb9bc (qt/qtbase/6.0) c3d8270f2f0bf379ecb4aa868c4feefb3ca181ed (qt/tqtc-qtbase/tqtc/lts-5.15)
Description
Hi,
I have a custom QComboBox which popup uses a multi-column view. When I click on the comboBox to open the popup, only the first column of a row gets selected. If I move my mouse around, all columns are getting properly selected.
While digging in the source code to understand what was happening (with the hope to find a flag to set on the comboBox), I noticed that qcombobox.cpp, line 2666, in the showPopup() function, the select call goes as follow:
view()>selectionModel()>setCurrentIndex(d->currentIndex, QItemSelectionModel::ClearAndSelect);
QItemSelectionModel::ClearAndSelect only selects the first column of the row.
It should be: QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows to select all columns of the row.
Seems fairly benign to do this change, but maybe this should be an additional flag on the qcombobox.
Thanks,
Eric
Attachments
For Gerrit Dashboard: QTBUG-86776 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
329758,4 | QComboBox: fix select all columns in the view | dev | qt/qtbase | Status: MERGED | +2 | 0 |
329917,2 | QComboBox: fix select all columns in the view | 6.0 | qt/qtbase | Status: MERGED | +2 | 0 |
329920,2 | QComboBox: fix select all columns in the view | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |