How do i simulate a mouse click event from a device that is not the mouse?

I can set the mouse position with a motion sensor.

Then I would like to send a Left Button Press after one second hover in
aspot.  However, none of the GUI elements are reacting to the event.
=========
MainWindow ....

void mouseMotionController()
{
....
if (mouse is in same position for a second)
{
printf("mouse is hovering");

 QMouseEvent * evt  = new QMouseEvent (
                          QEvent::MouseButtonPress,
                          pressPoint,
                          Qt::LeftButton,
                           Qt::LeftButton,
                          Qt::NoModifier);
 QCoreApplication::postEvent(this, evt);
}


I've tried a few permutations of this -- using qApp instead of
QCoreApplication , using sendEvent instead of postEvent, using a
QGraphicsSceneMouseEvent instead of a Mouse Event.  But none of these seems
to work.

Any ideas?

Thanks
Mitchell
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to