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've problem with order number on devices too. Unfortunately the first focused object after running application is the whole widget. I use a QTimer with "singleshot" property set to "true" and then call to give the focus to the first object.



  • 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.



  • nice job ;) it should be fixed. thank you


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.