Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-124191

[REG: 6.6->6.7] QComboBox custom view is destroyed if style changes

XMLWordPrintable

    • Windows
    • 61b71ffb3 (dev), 917a0bf26 (6.7)

      Resulted from "Introduce Windows 11 styled ComboBox in QWindows11Style" 9da8d67b3bca1d40ae221a9c6be218fe57759724 https://codereview.qt-project.org/c/qt/qtbase/+/481184 where it now always destroys the view if style changes:

      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();
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            wladimir.leuschner Wladimir Leuschner
            poikelin Joni Poikelin
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes