How to set QTouchEvent::TouchPoint primary?
Hi to everybody,
I'm trying to simulate QTouchEvents by creating myself TouchPoints. I was wondering how I can set them primary, since isPrimary() exists, but setPrimary() does not exist.
isPrimary() is not even virtual so I think I cannot try to subclass the TouchPoint class and reimplement it.
I was also wondering why the QTouchEvent::TouchPoint constructors are not published in the docs also if they exist.
Code:
/usr/include/qt4/QtGui/qevent.h:739: note: candidates are: QTouchEvent::TouchPoint::TouchPoint(const QTouchEvent::TouchPoint&)
/usr/include/qt4/QtGui/qevent.h:738: note: QTouchEvent::TouchPoint::TouchPoint(int)
Has anybody any idea?
Thanks in advance.
Elindros
Re: How to set QTouchEvent::TouchPoint primary?
It is encoded in the state:
Code:
event.setState(Qt::TouchPointPrimary)