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

QComboBox popup position changes after widget reparenting

    XMLWordPrintable

Details

    • Linux/X11, Windows
    • 6c036012b (dev), 540002579 (6.8), 4c7456c2b (6.7), 1d409c085 (dev), a94b3deb4 (6.8), febf188e3 (6.7), 681bc93b8 (tqtc/lts-6.5)

    Description

      ComboBox popup position is invalid after it was reparented. Popup window should be already created (showed once before). New combobox geometry should match the old one after reparenting.

       

      // combo is added to child widget of a window
      // replace child with a new child, move combo to the new child
      // call deleteLater() for a child to not destroy the combo immediately
      // combo will be reparented
      child->deleteLater();
      auto *newChild = new QWidget();
      auto *newChildLayout = new QVBoxLayout(newChild);
      newChildLayout->addWidget(combo);
      widgetLayout->addWidget(newChild); 

      This is a regression after change
      Reparent QWindow children when reparenting QWidget
      https://codereview.qt-project.org/c/qt/qtbase/+/544899

      that was merged into 6.7 and cherry-picked into 6.6.

       

      Attachments

        For Gerrit Dashboard: QTBUG-127641
        # Subject Branch Project Status CR V

        Activity

          People

            vestbo Tor Arne Vestbø
            volodymyr_zibarov Volodymr Zibarov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: