diff --git a/widgets/label.cpp b/widgets/label.cpp index d318ba0bb..4a8269b18 100644 --- a/widgets/label.cpp +++ b/widgets/label.cpp @@ -87,7 +87,7 @@ void Label::paintWidget(QPainter *p, const QStyleOptionGraphicsItem *option, QWi Q_UNUSED(widget); p->setPen(d->textPen); - p->drawText(localGeometry(), d->alignment | Qt::TextWordWrap, d->text); + p->drawText(option->rect, d->alignment | Qt::TextWordWrap, d->text); } }