QDeclarativeView inside full screen QWidget does not get focus at startup
-
To be able to emulate different screen sizes on a single device, I decided to wrap my QDeclarativeView inside a QWidget, with a QLayout. For some weird reason this made my QDeclarativeView not get keyboard focus at startup, if I open the QWidget in full screen mode. In non-fullscreen mode, focus works as expected.
The only workaround for this I have come up with is to add another widget, e.g. an invisible QPushButton, to the layout before I add the QDeclarativeView, and then move the focus to the QDeclarativeView using setFocus() after I open the widget.
Is this something that anyone else has experienced, or has some kind of explanation for? Or is it simply a bug?
-
I filed a bug report about this, "QTBUG-22882":https://bugreports.qt.nokia.com/browse/QTBUG-22882, with a minimal example that can be used to reproduce the problem.