Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
4.4.3
-
None
Description
Running the code below works properly on Linux, moving the mouse cursor to the 0,0 and then 50,50 position.
When running on Qt for Embedded Linux, the position doesn't change, the printed lines all have the same coordinates.
// ---------------------------------------
#include <QtGui>
class TestSetCursor : public QPushButton
{
Q_OBJECT
public:
TestSetCursor();
public slots:
void doClick();
};
TestSetCursor::TestSetCursor()
: QPushButton( 0 )
{
setText( "Test" );
connect( this, SIGNAL( clicked() ), this, SLOT( doClick() ) );
}
void TestSetCursor::doClick()
{
qDebug() << "Cursor Position at start:" << QCursor::pos();
QCursor::setPos( 0, 0 );
qDebug() << "Cursor Position after setting to top-left:" << QCursor::pos();
QCursor::setPos( 50, 50 );
qDebug() << "Cursor Position after setting to 50/50:" << QCursor::pos();
qDebug();
}
int main( int argc, char * argv[] )
{
QApplication app( argc, argv );
TestSetCursor tsc;
tsc.show();
return app.exec();
}
#include "main.moc"
// ---------------------------------------