Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML app hangs on QQmlApplicationEngine::load()
Forum Updated to NodeBB v4.3 + New Features

QML app hangs on QQmlApplicationEngine::load()

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 3 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aatwo
    wrote on 10 Aug 2021, 17:45 last edited by
    #1

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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      aatwo
      wrote on 10 Aug 2021, 19:07 last edited by
      #2

      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 :(

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aatwo
        wrote on 10 Aug 2021, 19:51 last edited by
        #3

        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?

        J 1 Reply Last reply 11 Aug 2021, 04:57
        1
        • J Offline
          J Offline
          jeremy_k
          wrote on 11 Aug 2021, 04:52 last edited by
          #4

          Try the QML profiler in Creator, and/or turning on categorized logging.

          Asking a question about code? http://eel.is/iso-c++/testcase/

          1 Reply Last reply
          0
          • A aatwo
            10 Aug 2021, 19:51

            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?

            J Offline
            J Offline
            J.Hilk
            Moderators
            wrote on 11 Aug 2021, 04:57 last edited by
            #5

            @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.


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            0

            1/5

            10 Aug 2021, 17:45

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved