diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-03 13:53:16 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-03-03 13:58:05 (GMT) |
commit | 515f6a8c3dbe382bbb4f84f758a61c719143d8a6 (patch) | |
tree | 0f43fe3f20d7b2c34b6ac1667db7fdeef9eb6f66 /src/gui/widgets/qcheckbox.cpp | |
parent | 4a5eaccce02dbabfd81e8809d453fc268cdba644 (diff) | |
download | Qt-515f6a8c3dbe382bbb4f84f758a61c719143d8a6.zip Qt-515f6a8c3dbe382bbb4f84f758a61c719143d8a6.tar.gz Qt-515f6a8c3dbe382bbb4f84f758a61c719143d8a6.tar.bz2 |
sizeHint of checkbox/radiobutton without text is not correct
Reviewed-by: Jens Bache-Wiig
Diffstat (limited to 'src/gui/widgets/qcheckbox.cpp')
-rw-r--r-- | src/gui/widgets/qcheckbox.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qcheckbox.cpp b/src/gui/widgets/qcheckbox.cpp index 4e0ff66..bc0900e 100644 --- a/src/gui/widgets/qcheckbox.cpp +++ b/src/gui/widgets/qcheckbox.cpp @@ -291,7 +291,7 @@ QSize QCheckBox::sizeHint() const QFontMetrics fm = fontMetrics(); QStyleOptionButton opt; initStyleOption(&opt); - QSize sz = style()->itemTextRect(fm, QRect(0, 0, 1, 1), Qt::TextShowMnemonic, false, + QSize sz = style()->itemTextRect(fm, QRect(), Qt::TextShowMnemonic, false, text()).size(); if (!opt.icon.isNull()) sz = QSize(sz.width() + opt.iconSize.width() + 4, qMax(sz.height(), opt.iconSize.height())); |