Details
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)