diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 06de5566ff9..1fe9a8d7be5 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -3003,24 +3003,8 @@ void QComboBox::changeEvent(QEvent *e) Q_D(QComboBox); switch (e->type()) { case QEvent::StyleChange: - if (d->container) { -// If on Windows, force recreation of ComboBox container, since -// windows11 style depends on WA_TranslucentBackground -#ifdef Q_OS_WIN - auto delegate = itemDelegate(); - d->container->deleteLater(); - // d->container needs to be set explicitly to nullptr - // since QComboBoxPrivate::viewContainer() only - // creates a new QComboBoxPrivateContainer when - // d->container has the value of nullptr - d->container = nullptr; - d->container = d->viewContainer(); - delegate->setParent(d->container); - setItemDelegate(delegate); - -#endif + if (d->container) d->container->updateStyleSettings(); - } d->updateDelegate(); #ifdef Q_OS_MAC