Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.0 Beta 2
-
None
-
Windows 10-64 bit. Visual Studio 2017, 5.12.0 beta 2 from installer.
-
-
d9200fcac58a9347decd417c217c18b7e34471ec (qt/qtbase/5.12.0)
Description
This breaks adding any OpenGL QWindow to a QMainWindow in 5.12.
Creating a QWidget window container for an OpenGL window via createWindowContainer leads broken keyboard focus if it's added to a QMainWindow. The container widget is never able to regain focus after after clicking on another widget. This worked OK on 5.11.2
Possibly related: Focus handling is different in 5.12 even when not adding to QMainWindow. I need to set focus policy to StrongFocus otherwise it never gets focus. On 5.11.2 focus just works.
See attached example which contains both of the above cases. It's the "openglwindow" example from the Qt examples with small modification with a key press handler to show which keys were pressed.
Steps to reproduce:
- Click on combo
- Click on openglwindow
- Press key
Expected: Key presses are received by the openglwindow
Actual: Key presses stay in mainwindow (5.12)
Attachments
For Gerrit Dashboard: QTBUG-71352 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
245442,2 | Windows QPA: Fix broken focus for native child windows | 5.12.0 | qt/qtbase | Status: MERGED | +2 | 0 |