QWindow - gestures
Does anybody know if there is a way to get QGestureEvent's in QWindow without using QtQuick?
It is a bit complicated to work with QTouchEvents directly...
Thanks in advance!
You should be able to re-implement the "event":http://qt-project.org/doc/qt-5.0/qtgui/qwindow.html#event and recognize gestures accordingly. But before you can do that you should be "grabbing the gestures":http://harmattan-dev.nokia.com/docs/library/html/qt4/qwidget.html#grabGesture you want to detect.Now, I know I can do this with QWidget objects but not sure about QWIndows.
Ideally I think QWindow should be only a container for QWidget objects from where you would detect the gestures.
Thank you for the reply,
You re right we can grab gestures with QWidget, but unfortunately this functionality seems to be missing for QWindow (I guess thats becouse QtQuick has it's own gestures handling) , so without using QtQuick all we got is QTouchEvent wich is a bit low level.
I was hoping that theres a way to use Qt's standart gesture recognizers to get gestures for QWindow...
Im using QWindow to render OpenGL and I wouldnt want to move to QGlWidget
I'm in the same boat. I was hoping to receive QGestureEvent in a QWindow.
I have a program with Qmainwindow as root. In Qmainwindow I created a MainWidget inherited from Qwidget, which acts like my layout. This MainWidget contains a Qwindow, where I draw opengl directly. Now I want that my Qwindow get gestures event, if I run my program on a tablet.
Would I get gestures event in my MainWidget and can manually tell my Qwindow?
If not, can I create a transparent qwidget over my Qwindow and get gestures events?
Thanks in advance