summaryrefslogtreecommitdiff
path: root/examples/activeqt/hierarchy/objects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/activeqt/hierarchy/objects.cpp')
-rw-r--r--examples/activeqt/hierarchy/objects.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/activeqt/hierarchy/objects.cpp b/examples/activeqt/hierarchy/objects.cpp
index c28cd85..af9d966 100644
--- a/examples/activeqt/hierarchy/objects.cpp
+++ b/examples/activeqt/hierarchy/objects.cpp
@@ -104,7 +104,7 @@ QString QSubWidget::label() const
QSize QSubWidget::sizeHint() const
{
QFontMetrics fm(font());
- return QSize(fm.width(m_label), fm.height());
+ return QSize(fm.horizontalAdvance(m_label), fm.height());
}
void QSubWidget::paintEvent(QPaintEvent *)