diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-04-26 09:53:55 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2010-04-26 09:53:55 (GMT) |
commit | 3dd2b86db2b10998dc0a49e2310dd2e8699159cf (patch) | |
tree | e7fec79e43b1652e4da4dcc2786fa530c479d482 /tests/auto/qradiobutton | |
parent | 8daa3ee6591f0ec5f65552a8a9290228d6e9f0ab (diff) | |
download | Qt-3dd2b86db2b10998dc0a49e2310dd2e8699159cf.zip Qt-3dd2b86db2b10998dc0a49e2310dd2e8699159cf.tar.gz Qt-3dd2b86db2b10998dc0a49e2310dd2e8699159cf.tar.bz2 |
QRadioButton did not have a minimumSizeHint()
Fortunately the *default* horizontal size policy was
QSizePolicy::Minimum. However if the size policy was set to for instance
Preferred it could shrink down until it disappeared.
The following patch will do the same as QLabel does it:
sizeHint is the same as minimumSizeHint.
Task-number: QTBUG-2606
Diffstat (limited to 'tests/auto/qradiobutton')
-rw-r--r-- | tests/auto/qradiobutton/tst_qradiobutton.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qradiobutton/tst_qradiobutton.cpp b/tests/auto/qradiobutton/tst_qradiobutton.cpp index c074496..531ebab 100644 --- a/tests/auto/qradiobutton/tst_qradiobutton.cpp +++ b/tests/auto/qradiobutton/tst_qradiobutton.cpp @@ -58,6 +58,7 @@ public: private slots: void task190739_focus(); + void minimumSizeHint(); private: }; @@ -96,6 +97,11 @@ void tst_QRadioButton::task190739_focus() } +void tst_QRadioButton::minimumSizeHint() +{ + QRadioButton button(tr("QRadioButtons sizeHint is the same as it's minimumSizeHint")); + QCOMPARE(button.sizeHint(), button.minimumSizeHint()); +} QTEST_MAIN(tst_QRadioButton) |