Hi all,
I have a QLabel and I want that, that QLabel follow the mouse movement of the user.
Currently I have the following Code:
{
int x = currentPos.x();
int y = currentPos.y();
label->setText("testje");
label->setGeometry(x,y, 50, 50);
label->show();
}
label = new QLabel(this);
void CSomeClass::mouseMoveEvent( QMouseEvent *event )
{
QPoint currentPos = QWidget::mapFromGlobal(QCursor::pos());
int x = currentPos.x();
int y = currentPos.y();
label->setText("testje");
label->setGeometry(x,y, 50, 50);
label->show();
}
To copy to clipboard, switch view to plain text mode
Problem
This works fine but the problem is that the movement is too slow!
The text halts everytime.
Does anyone know how to solve this?
How do I get a mouse movement with text beneath that follows directly the cursor?
Thanx!
Bookmarks