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

[Reg] NSSearchField no longer visible after hide/show QDialog

    XMLWordPrintable

Details

    • macOS
    • 988039729 (dev), 4d5aedac1 (6.7)

    Description

      The native NSSearchField, which is added using QWidget::createWindowContainer is no longer visible after hide/show of the QDialog.
      It used to work with in Qt 5 with QMacCocoaViewContainer(), but the same code no longer works in Qt 5 or Qt 6 using the new QWidget::createWindowContainer.

      Specifically, it's added to the QDialog using:
      layout()->addWidget(QWidget::createWindowContainer(QWindow::fromWinId(WId(nsSearchField)), this));

      See attached test project.

      To reproduce:
      1. Press the button to open the dialog, search field appears.
      2. Close the dialog
      3. Press the button again to open the dialog, search field is no longer visible.

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            jonaski Jonas Kvinge
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes