diff options
Diffstat (limited to 'tests/auto/qtextedit/tst_qtextedit.cpp')
-rw-r--r-- | tests/auto/qtextedit/tst_qtextedit.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qtextedit/tst_qtextedit.cpp b/tests/auto/qtextedit/tst_qtextedit.cpp index 321aa22..d1832d8 100644 --- a/tests/auto/qtextedit/tst_qtextedit.cpp +++ b/tests/auto/qtextedit/tst_qtextedit.cpp @@ -2163,6 +2163,9 @@ void tst_QTextEdit::noWrapBackgrounds() QTextEdit edit; edit.setLineWrapMode(QTextEdit::NoWrap); + // hide the cursor in order to make the image comparison below reliable + edit.setCursorWidth(0); + QTextFrame *root = edit.document()->rootFrame(); QTextFrameFormat frameFormat = root->frameFormat(); frameFormat.setLeftMargin(2); @@ -2178,8 +2181,6 @@ void tst_QTextEdit::noWrapBackgrounds() layout->addWidget(&edit); topLevel.show(); - QTest::qWait(1000); - QImage img = QPixmap::grabWidget(edit.viewport()).toImage(); QCOMPARE(img, img.mirrored(true, false)); } |