QLabel: create the text control when getting polished, if necessary
This amends 7bee4e9cb3, and makes sure
that the text control is created even if the attributes that define
whether it's needed are changed after a call to setText or
setTextInteractionFlags, where it is otherwise created.
Task-number: QTBUG-84080
Pick-to: 5.15
Change-Id: I3be27f35bc83944948027345535d1202a7b97163
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
bb10
parent
37b132cd4e
commit
c7b457e287
|
|
@ -1025,6 +1025,9 @@ bool QLabel::event(QEvent *e)
|
|||
) {
|
||||
d->setLayoutItemMargins(QStyle::SE_LabelLayoutItem);
|
||||
d->updateLabel();
|
||||
} else if (type == QEvent::Polish) {
|
||||
if (d->needTextControl())
|
||||
d->ensureTextControl();
|
||||
}
|
||||
|
||||
return QFrame::event(e);
|
||||
|
|
|
|||
Loading…
Reference in New Issue