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

Assert when using a QWidget inside NSSavePanel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.5.2, 6.6.0
    • 6.5.0
    • QPA
    • None
    • macOS
    • 1ea0625ca (dev), 4cfbbf84d (6.5)

    Description

      macOS allows to add custom widgets into the native file browser:

      Our application inserts a QWidget here which is converted to a NSView by using the QWidget::winId() API. This works fine when using Qt binaries build in release mode, but when the Qt binaries are build in debug mode an assert is triggered:
      ASSERT failure in QNSView: "The drawRect code path should not be hit when we are layer backed"

      We're migrating our application from Qt5 to Qt6. With Qt5 we didn't have this problem as the assert was only added in the Qt6 code.

      I attached a minimal Qt Creator project to the log that demonstrates the problem (in the example I added a simple QLabel to demonstrate the problem, but in reality we're adding a much more complex widget to the file browser)

      Attachments

        1. FileBrowser.png
          FileBrowser.png
          95 kB
        2. FileDialog.zip
          0.9 kB
        3. image-2023-05-10-11-04-28-622.png
          image-2023-05-10-11-04-28-622.png
          201 kB
        4. image-2023-05-10-11-04-49-481.png
          image-2023-05-10-11-04-49-481.png
          214 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            dbutijn David Butijn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes