tst_QGraphicsItem: stabilize cursor() test
The cursor test sometimes fails due to the fact that the topLevel widget has not yet reached it's fullscreen geometry. This means the QGraphicsView is to small and the test will fail. Avoid it by simply removing the topLevel widget since it's not used at all. Change-Id: Ia7b34f283a917a35b6665e6333a01378575a5a04 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
parent
76dfda1ad1
commit
024daeb08c
|
|
@ -4148,11 +4148,9 @@ void tst_QGraphicsItem::ensureVisible()
|
|||
void tst_QGraphicsItem::cursor()
|
||||
{
|
||||
QGraphicsScene scene;
|
||||
QWidget topLevel;
|
||||
QGraphicsView view(&scene,&topLevel);
|
||||
topLevel.showMaximized();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&topLevel));
|
||||
view.setFixedSize(topLevel.size());
|
||||
QGraphicsView view(&scene);
|
||||
view.showFullScreen();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&view));
|
||||
QGraphicsRectItem *item1 = scene.addRect(QRectF(-100, 0, 50, 50));
|
||||
QGraphicsRectItem *item2 = scene.addRect(QRectF(50, 0, 50, 50));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue