Priority: P1: Critical
Affects Version/s: 5.12.0 Beta 2
Component/s: Widgets: Main Window
Environment:Windows 10-64 bit. Visual Studio 2017, 5.12.0 beta 2 from installer.
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)
|For Gerrit Dashboard: QTBUG-71352|
|245442,2||Windows QPA: Fix broken focus for native child windows||5.12.0||qt/qtbase||Status: MERGED||+2||0|