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

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

    XMLWordPrintable

Details

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

    Description

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

      Attachments

        1. combobox.zip
          3 kB
          Joni Poikelin

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes