summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index 7b4e85f823..d3314494d5 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
@@ -686,7 +686,12 @@ void tst_QPushButton::hitButton()
QVBoxLayout *layout = new QVBoxLayout;
PushButton *button1 = new PushButton("Ok");
PushButton *button2 = new PushButton("Cancel");
- button2->setStyleSheet("QPushButton { margin: 10px; border-radius: 4px; border: 1px solid black; }");
+ button2->setStyleSheet("QPushButton {"
+ "padding: 5px;"
+ "margin: 5px;"
+ "border-radius: 4px;"
+ "border: 1px solid black; }"
+ );
layout->addWidget(button1);
layout->addWidget(button2);
@@ -700,7 +705,8 @@ void tst_QPushButton::hitButton()
const QPoint button2Center = button2->rect().center();
QVERIFY(button2->hitButton(button2Center));
- QVERIFY(!button2->hitButton(QPoint(0, 0)));
+ QVERIFY(button2->hitButton(QPoint(6, 6)));
+ QVERIFY(!button2->hitButton(QPoint(2, 2)));
}
QTEST_MAIN(tst_QPushButton)