Hi,

I have a QGlWidget and I have set it as the viewport of the
QDeclarativeView.
(https://projects.kde.org/projects/playground/games/gluon/repository/revisions/master/entry/player/touch/main.cpp#L61)
The widget is basically a QGLWidget inheritance, subclass.
(https://projects.kde.org/projects/playground/games/gluon/repository/revisions/master/entry/graphics/renderwidget.h#L38)
The QGLWidget gets the QDeclarativeView as the parent during the
object construction. (this is how I handle in my local clone)

I have tried to call the d->widget->setFocus() before this line:
https://projects.kde.org/projects/playground/games/gluon/repository/revisions/master/entry/player/touch/gamewindowmanager.cpp#L81

I have also tried to call the view->setFocus() before this line:
https://projects.kde.org/projects/playground/games/gluon/repository/revisions/master/entry/player/touch/main.cpp#L62

I also use event filtering, but that should hopfully not cause any issue:
https://projects.kde.org/projects/playground/games/gluon/repository/revisions/master/entry/player/touch/gamewindowmanager.cpp#L135

Everything works just fine apart from the focus setting meaning that I
cannot handle any input events, keystrokes on that widget. I have
other standalone applications resembling the functionality and the
focus works just fine there for the QGLWidget.
https://projects.kde.org/projects/playground/games/gluon/repository/revisions/master/entry/player/qt/mainwindow.cpp#L118
-> 125th: setCentralWidget( d->widget ); and 149th:
d->widget->setFocus() lines. In the latter case, I did not use any
QDeclarativeView, but QMainWindow.

Please help, when you can and have time. :-) Thank you in advance!

Best Regards,
Laszlo Papp
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to