tst_QGraphicsWidget: Test the cursor
Skip initStyleOption() if the cursor cannot be moved. Fixes: QTBUG-129545 Change-Id: I6a42314515ab3e32b79c8c123eb8769b8c2c8ecb Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
This commit is contained in:
parent
2c2d36fae1
commit
c377f4e9b7
@ -1,5 +1,4 @@
|
||||
[initStyleOption]
|
||||
macos
|
||||
android
|
||||
b2qt
|
||||
# QTBUG-100930
|
||||
|
@ -1085,8 +1085,10 @@ void tst_QGraphicsWidget::initStyleOption()
|
||||
}
|
||||
QFETCH(bool, underMouse);
|
||||
if (underMouse) {
|
||||
QCursor::setPos(view.viewport()->mapToGlobal(view.mapFromScene(widget->mapToScene(widget->boundingRect().center()))));
|
||||
QTest::qWait(100);
|
||||
const auto pos = view.viewport()->mapToGlobal(view.mapFromScene(widget->mapToScene(widget->boundingRect().center())));
|
||||
QCursor::setPos(pos);
|
||||
if (!QTest::qWaitFor([pos]{ return QCursor::pos() == pos; }))
|
||||
QSKIP("Cannot move cursor");
|
||||
}
|
||||
|
||||
QFETCH(QPalette, palette);
|
||||
|
Loading…
x
Reference in New Issue
Block a user