learner_qt
9th February 2013, 17:22
After every second I want to get the cursor position. But I dont know how to obtain the value returned from a slot???
Please help.
Thanks in advance! :)
Here is my code:
QTimer *mtimer = new QTimer();
connect (mtimer, SIGNAL(timeout()), this, SLOT (get_cursor_position()));
QPoint MainWindow::get_cursor_position()
{
q = QCursor::pos();
return q;
}
Please help.
Thanks in advance! :)
Here is my code:
QTimer *mtimer = new QTimer();
connect (mtimer, SIGNAL(timeout()), this, SLOT (get_cursor_position()));
QPoint MainWindow::get_cursor_position()
{
q = QCursor::pos();
return q;
}