Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.10.1, 5.11.0, 5.11.1, 5.13.1
-
None
-
windows 10, Visual Studio 2017
Description
I have a QWindow with Qt::WindowTransparentForInput flag set. When I embed it in a widget with QWidget::createWindowContainer and hover mouse over the window the hosting widget gets mouse input in embedded window's coordinates.
This is a regression found when migrating from Qt 5.6.2, where it worked correctly.
Example code:
int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget w; w.setFixedSize(300, 50); auto menubar = new QMenuBar; menubar->addAction("Foo"); menubar->addAction("Bar"); menubar->addAction("Bazz"); auto win = new QWindow(); win->setFlag(Qt::WindowTransparentForInput); auto container = QWidget::createWindowContainer(win); w.setLayout(new QVBoxLayout); w.layout()->setMenuBar(menubar); w.layout()->setContentsMargins(0,0,0,0); w.layout()->addWidget(container); w.show(); return a.exec(); }
Result: