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