diff options
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 76218a9eb3..d48d5ae15d 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -9556,6 +9556,18 @@ void QWidget::ensurePolished() const QChildEvent e(QEvent::ChildPolished, const_cast<QWidget *>(this)); QCoreApplication::sendEvent(d->parent, &e); } +#ifdef Q_WS_QPA + if (d->extra && d->extra->topextra && d->extra->topextra->window + && d->extra->topextra->window->objectName().isEmpty()) { + QString on = objectName(); + if (on.isEmpty()) { + on = QString::fromUtf8(metaObject()->className()); + on += QLatin1String("Class"); + } + on += QLatin1String("Window"); + d->extra->topextra->window->setObjectName(on); + } +#endif } /*! |