From 02ad876e1425e230cfd421bb11c9deed3e43db21 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Fri, 16 Jul 2021 16:02:15 +0200 Subject: [PATCH] Qt 5.15 ( probably earlier ) needs te initialization in componentComplete --- playground/webview/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/playground/webview/main.cpp b/playground/webview/main.cpp index 6fb7865e..0a6de6ec 100644 --- a/playground/webview/main.cpp +++ b/playground/webview/main.cpp @@ -16,6 +16,8 @@ class WebView : public QQuickWebEngineView { + using Inherited = QQuickWebEngineView; + public: WebView( const char* url, QQuickItem* parent = nullptr ) : WebView( parent ) @@ -26,6 +28,7 @@ class WebView : public QQuickWebEngineView WebView( QQuickItem* parent = nullptr ) : QQuickWebEngineView( parent ) { + componentComplete(); } }; @@ -35,12 +38,11 @@ int main( int argc, char* argv[] ) QskObjectCounter counter( true ); #endif - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - - QGuiApplication app( argc, argv ); - QtWebEngine::initialize(); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QGuiApplication app( argc, argv ); + SkinnyFont::init( &app ); SkinnyShortcut::enable( SkinnyShortcut::Quit | SkinnyShortcut::DebugShortcuts );