PDA

View Full Version : qt mouseEvent



lapdx
8th November 2012, 13:37
QMouseEvent qm2(QEvent::MouseButtonPress, QPoint(10,10), Qt::LeftButton , Qt::LeftButton, Qt::NoModifier);
QApplication::sendEvent(ui->pushButton, &qm2);
QMouseEvent qm3(QEvent::MouseButtonRelease, QPoint(10,10), Qt::LeftButton , Qt::LeftButton, Qt::NoModifier);
QApplication::sendEvent(ui->pushButton, &qm3);

How to true press to button? and unpress button? This method is working, but not fully working.
How to set delay for Press and Release?