summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qlabel.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-04-01 21:07:37 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-04-01 21:07:37 (GMT)
commit23eb677daea8e084fcaa1256f1a9433e324b1474 (patch)
treea21225293db6881174814290ad7298120c4a078b /src/gui/widgets/qlabel.cpp
parent1f327a1de8db245d0b28e7dfdc5bca1af0b56782 (diff)
parent37e8fd4e09c1221efde3e67e6acd5cfbb35686fd (diff)
downloadQt-23eb677daea8e084fcaa1256f1a9433e324b1474.zip
Qt-23eb677daea8e084fcaa1256f1a9433e324b1474.tar.gz
Qt-23eb677daea8e084fcaa1256f1a9433e324b1474.tar.bz2
Merge remote branch 'origin/4.7' into HEAD
Conflicts: examples/declarative/proxywidgets/proxywidgets.pro examples/declarative/widgets/mywidgets.pro examples/declarative/widgets/widgets.pro
Diffstat (limited to 'src/gui/widgets/qlabel.cpp')
-rw-r--r--src/gui/widgets/qlabel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/qlabel.cpp b/src/gui/widgets/qlabel.cpp
index b81f04f..bdbd0b0 100644
--- a/src/gui/widgets/qlabel.cpp
+++ b/src/gui/widgets/qlabel.cpp
@@ -53,6 +53,7 @@
#include <qurl.h>
#include "qlabel_p.h"
#include "private/qstylesheetstyle_p.h"
+#include <qmath.h>
QT_BEGIN_NAMESPACE
@@ -661,7 +662,9 @@ QSize QLabelPrivate::sizeForWidth(int w) const
} else {
control->setTextWidth(-1);
}
- br = QRect(QPoint(0, 0), control->size().toSize());
+
+ QSizeF controlSize = control->size();
+ br = QRect(QPoint(0, 0), QSize(qCeil(controlSize.width()), qCeil(controlSize.height())));
// restore state
control->setTextWidth(oldTextWidth);