QML app hangs on QQmlApplicationEngine::load()
-
Hi all. I have a QML app (Qt 5.14.2) which I created on machine-1 without issue. I just tried running it on machine-2 with all the dependencies gathered using the win deploy tool but nothing would appear. The app was running in the process manager but nothing was appearing on-screen.
So after setting up a development environment on machine-2 and running a debug build it appears to be hanging for some reason on the following line:
engine.load(QUrl(QStringLiteral("qrc:/qml/mainwindow.qml")));
Anyone have any ideas on how I can debug this or attempt to resolve it? I have several or so simple QML apps from machine-1 which all seem to exhibit the same issue on machine-2 and I get absolutely no log output.
Very simple QML apps seem to work ok (e.g. the swipe template).
-
Ok I was being ever so slightly impatient. The app does eventually open but it takes around 10-12 minutes. Anyone know what might cause such insane load times for a small QML application?
I tried a couple of things to force software rendering but this yeilded no gain :(
-
The plot thickens. So taking out all references to FileDialog removes the start-up penalty completely. I have a number of FileDialogs spread across my application and it seems there is some fixed penalty for each FileDialog that is declared. Something like a full minute per dialog...
Anyone got any workarounds for this?
-
Try the QML profiler in Creator, and/or turning on categorized logging.
-
@aatwo 2 options you can try:
1: Update the Qt version used and or the windows its running on.
- I had some serious issues on QML load times on iOS that suddenly appeared and suddenly went away. Each happening with an update of the Xcode SDK
2: What File dialog are you using?
- https://doc.qt.io/qt-5/qml-qtquick-dialogs-filedialog.html
- https://doc.qt.io/qt-5/qml-qt-labs-platform-filedialog.html
try other other one from what you're currently using, they are I fact quite different.