Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.1.1, 5.3.0
-
None
-
Windows 7
-
92c7cb815522ad1b31e98cc1e7adeabde58057da (5.4. ,27.8.2014, 5.4)
Description
If I put a QComboBox in a scrollable parent (e.g., QScrollArea, but also QTreeView etc.), open the combo's popup, and then mouse-wheel scroll the parent, the popup does not scroll with the rest of the combo.
Minimal example:
#include <QApplication> #include <QLabel> #include <QComboBox> #include <QLayout> #include <QScrollArea> int main(int argc, char *argv[]) { QApplication a(argc, argv); // Create a layout auto layout = new QVBoxLayout(); layout->setSizeConstraint( QLayout::SetMinAndMaxSize ); // Add some labels for filler for( int i=0; i < 10; ++i ) { layout->addWidget( new QLabel( "Blah" ) ); } // Create a combobox and add to layout auto cmb = new QComboBox(); cmb->addItems( QStringList() << "Won" << "Too" << "3" << "fore" ); layout->addWidget( cmb ); // Add some labels for filler for( int i=0; i < 10; ++i ) { layout->addWidget( new QLabel( "Blah" ) ); } // Put in a widget auto widget = new QWidget(); widget->setLayout( layout ); // Put in a scroll area auto scroll = new QScrollArea(); scroll->setWidget( widget ); scroll->show(); return a.exec(); }
I've attached a screenshot that shows the problem.
This is all on Windows. On Linux with Qt 5.3.0 and the same code as above, I do not see this problem because the scroll area does not respond to mouse wheel events while the child combo is open.
Attachments
Issue Links
- resulted in
-
QTBUG-42731 [REG 5.3->5.4]: Scrolling outside of popup of combo box while popped closes popup
- Closed
For Gerrit Dashboard: QTBUG-40656 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
93251,4 | Close popup widgets when wheel events are received | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |
101894,1 | Swallow wheel events while a popup widget is open. | 5.4 | qt/qtbase | Status: ABANDONED | 0 | 0 |
101939,1 | WIP: Send wheel events to popup widget. | 5.4 | qt/qtbase | Status: ABANDONED | 0 | 0 |
103315,2 | Swallow wheel events while a popup widget is open. | 5.4.1 | qt/qtbase | Status: MERGED | +2 | 0 |
103606,2 | WIP: Send wheel events to popup widget. | 5.4.1 | qt/qtbase | Status: ABANDONED | 0 | 0 |
106204,2 | WIP: Send wheel events to popup widget. | dev | qt/qtbase | Status: ABANDONED | -2 | 0 |