From 89ce36fca455bf2babf3eae772ca21ce140cf16d Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 11 Apr 2014 14:20:48 +0200 Subject: Fix PieMenu not showing in enterprise-gallery launcher demo. The problem is that the root item doesn't get the correct size - or any size for that matter - so it is never visible. The fix for this is already in Qt 5.3 (see QTBUG-36938), but we can still work around it for earlier versions with this fix. Task-number: QTRD-3040 Change-Id: I38a5f793cf1cc07a758d9118c31bc3177a75da54 Reviewed-by: Samuli Piippo Reviewed-by: Kalle Viironen Reviewed-by: Gatis Paeglis --- basicsuite/shared/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'basicsuite/shared') diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp index 25c3cb4..d33b09c 100644 --- a/basicsuite/shared/main.cpp +++ b/basicsuite/shared/main.cpp @@ -25,6 +25,9 @@ #include #include +#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0)) +#include +#endif #include #include @@ -70,6 +73,11 @@ int main(int argc, char **argv) } QQuickView view; +#if (QT_VERSION < QT_VERSION_CHECK(5, 3, 0)) + // Ensure the width and height are valid because of QTBUG-36938. + QObject::connect(&view, SIGNAL(widthChanged(int)), view.contentItem(), SLOT(setWidth(int))); + QObject::connect(&view, SIGNAL(heightChanged(int)), view.contentItem(), SLOT(setHeight(int))); +#endif DummyEngine engine; view.rootContext()->setContextProperty("engine", &engine); -- cgit v1.2.3