Details
-
Bug
-
Resolution: Cannot Reproduce
-
P1: Critical
-
None
-
5.12.1, 5.12.2
-
None
-
macOS 10.14.4
Description
This application changes style of NSWindow to NSWindowStyleMaskFullSizeContentView and that seems to leading to deadlock between render and main thread. The problem does not exist on macOS 10.14.3 and earlier.
Application started on macOS 10.14.4 shows black window and spinning beach ball.
main.mm
#include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQuickWindow> #import <Cocoa/Cocoa.h> int main(int argc, char *argv[]) { QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) return -1; QQuickWindow* window = qobject_cast<QQuickWindow*>( engine.rootObjects().takeFirst() ); if(window) { NSView* native_view = reinterpret_cast<NSView*>( window->winId() ); NSWindow* native_window = native_view.window; native_window.titlebarAppearsTransparent = YES; native_window.titleVisibility = NSWindowTitleHidden; native_window.styleMask |= NSWindowStyleMaskFullSizeContentView; } return app.exec(); }
main.qml
import QtQuick 2.9 import QtQuick.Controls 2.0 import QtQuick.Window 2.2 ApplicationWindow { id: mainWindow visible: true width: 640 height: 480 Rectangle { anchors.fill: parent color: "yellow" Text { anchors.centerIn: parent text: "Text" color: "green" } } }
The problem exists when using QtQuick Controls 1 and 2 in Qt 5.12.1 and 5.12.2 on macOS 10.14.4