Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
5.6.2, 5.9.1
-
None
-
Windows 10
Description
Steps to reproduce:
- Create a widget with Qt::WindowStaysOnTopHint and add a QComboBox to it.
- Open the combo's popup and close it (works as expected).
- Click somewhere outside the app and then click inside it so it becomes active again.
- Open the popup again - it should show up as previously but instead it shows under the window.
Sample code:
#include <QApplication> #include <QMainWindow> #include <QComboBox> int main(int argc, char *argv[]) { QApplication a(argc, argv); auto box = new QComboBox(); box->addItems(QStringList() << "Foo" << "Bar"); QMainWindow w(nullptr, Qt::WindowStaysOnTopHint); w.setCentralWidget(box); w.setContentsMargins(10,10,10,10); w.show(); return a.exec(); }
Attached are screenshots of what it looks like before and after the active window switch.
Attachments
Issue Links
- duplicates
-
QTBUG-62004 Context menu was painted under window with Qt::WindowStaysOnTopHint flag.
- Closed
- is duplicated by
-
QTBUG-62327 QComboBox items fall through the window
- Closed
-
QTBUG-61809 Qt::WindowStaysOnTopHint causes QComboBox drop-down list to be hidden behind the window
- Closed