Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QML Deployment on Windows doesn't show any window
Forum Updated to NodeBB v4.3 + New Features

QML Deployment on Windows doesn't show any window

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 4 Posters 4.5k Views 4 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.
  • M Offline
    M Offline
    Mark81
    wrote on last edited by
    #1

    I have a QtQuick application written in Qt5.10.1. It works fine withing QtCreator.
    My QML files are placed into a Resources.qrc. Now I'm using windeployqt to retrieve all the relevant dependencies.

    First question: the doc page says:

    If your application uses Qt Quick, run:
    windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary>

    I still need to use --qmldir even my QML files are placed into resources?

    I also added the following libraries: opengl qml quick quickwidgets.
    But when I launch the application nothing is shown and checking from process manager I can see my program there.

    Launching from console no output is also shown - the prompt returns immediately (and the program is still loaded in memory).

    What am I missing?

    sierdzioS 2 Replies Last reply
    0
    • M Mark81

      I have a QtQuick application written in Qt5.10.1. It works fine withing QtCreator.
      My QML files are placed into a Resources.qrc. Now I'm using windeployqt to retrieve all the relevant dependencies.

      First question: the doc page says:

      If your application uses Qt Quick, run:
      windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary>

      I still need to use --qmldir even my QML files are placed into resources?

      I also added the following libraries: opengl qml quick quickwidgets.
      But when I launch the application nothing is shown and checking from process manager I can see my program there.

      Launching from console no output is also shown - the prompt returns immediately (and the program is still loaded in memory).

      What am I missing?

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @Mark81 said in QML Deployment on Windows doesn't show any window:

      I still need to use --qmldir even my QML files are placed into resources?

      Yes.

      (Z(:^

      1 Reply Last reply
      2
      • M Mark81

        I have a QtQuick application written in Qt5.10.1. It works fine withing QtCreator.
        My QML files are placed into a Resources.qrc. Now I'm using windeployqt to retrieve all the relevant dependencies.

        First question: the doc page says:

        If your application uses Qt Quick, run:
        windeployqt --qmldir <path-to-app-qml-files> <path-to-app-binary>

        I still need to use --qmldir even my QML files are placed into resources?

        I also added the following libraries: opengl qml quick quickwidgets.
        But when I launch the application nothing is shown and checking from process manager I can see my program there.

        Launching from console no output is also shown - the prompt returns immediately (and the program is still loaded in memory).

        What am I missing?

        sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        @Mark81 said in QML Deployment on Windows doesn't show any window:

        But when I launch the application nothing is shown and checking from process manager I can see my program there.
        Launching from console no output is also shown - the prompt returns immediately (and the program is still loaded in memory).
        What am I missing?

        It's been a few years since I last used Windows, so I'm only guessing. To me it seems likely that plugins have not been deployed, namely the qwindows.dll plugin. Libraries are probably deployed correctly because otherwise Windows prints a nice message ("failed to load X library").

        (Z(:^

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Mark81
          wrote on last edited by
          #4

          The platform plugin is there.
          Here my complete command:

          windeployqt -network -opengl -qml -quick -quickwidgets  --qml
          dir . --libdir ./dist --plugindir ./dist myapp.exe
          

          and here the output files:

          |   myapp.exe
          |   D3Dcompiler_47.dll
          |   libEGL.dll
          |   libgcc_s_dw2-1.dll
          |   libGLESV2.dll
          |   libstdc++-6.dll
          |   libwinpthread-1.dll
          |   opengl32sw.dll
          |   qhttp.dll
          |   Qt5Core.dll
          |   Qt5Gui.dll
          |   Qt5Network.dll
          |   Qt5OpenGL.dll
          |   Qt5Qml.dll
          |   Qt5Quick.dll
          |   Qt5QuickControls2.dll
          |   Qt5QuickTemplates2.dll
          |   Qt5QuickWidgets.dll
          |   Qt5Svg.dll
          |   Qt5Widgets.dll
          |
          +---bearer
          |       qgenericbearer.dll
          |
          +---iconengines
          |       qsvgicon.dll
          |
          +---imageformats
          |       qgif.dll
          |       qicns.dll
          |       qico.dll
          |       qjpeg.dll
          |       qsvg.dll
          |       qtga.dll
          |       qtiff.dll
          |       qwbmp.dll
          |       qwebp.dll
          |
          +---platforms
          |       qwindows.dll
          |
          +---qmltooling
          |       qmldbg_debugger.dll
          |       qmldbg_inspector.dll
          |       qmldbg_local.dll
          |       qmldbg_messages.dll
          |       qmldbg_native.dll
          |       qmldbg_nativedebugger.dll
          |       qmldbg_profiler.dll
          |       qmldbg_quickprofiler.dll
          |       qmldbg_server.dll
          |       qmldbg_tcp.dll
          |
          +---styles
          |       qwindowsvistastyle.dll
          |
          \---translations
                  qt_ar.qm
                  qt_bg.qm
                  qt_ca.qm
                  qt_cs.qm
                  qt_da.qm
                  qt_de.qm
                  qt_en.qm
                  qt_es.qm
                  qt_fi.qm
                  qt_fr.qm
                  qt_gd.qm
                  qt_he.qm
                  qt_hu.qm
                  qt_it.qm
                  qt_ja.qm
                  qt_ko.qm
                  qt_lv.qm
                  qt_pl.qm
                  qt_ru.qm
                  qt_sk.qm
                  qt_uk.qm
          
          1 Reply Last reply
          0
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi
            Just as a sanity check / note:
            The PC where nothing shows up.
            its openGL are up and running and verified to work ?
            I had an intel HD laptop where openGL app just hanged when started.
            Upgrading driver fixed it.

            M 1 Reply Last reply
            2
            • mrjjM mrjj

              Hi
              Just as a sanity check / note:
              The PC where nothing shows up.
              its openGL are up and running and verified to work ?
              I had an intel HD laptop where openGL app just hanged when started.
              Upgrading driver fixed it.

              M Offline
              M Offline
              Mark81
              wrote on last edited by
              #6

              @mrjj said in QML Deployment on Windows doesn't show any window:

              The PC where nothing shows up.
              its openGL are up and running and verified to work ?

              How to check this in a reliable way? Running inside QtCreator is not enough?

              mrjjM 1 Reply Last reply
              0
              • M Mark81

                @mrjj said in QML Deployment on Windows doesn't show any window:

                The PC where nothing shows up.
                its openGL are up and running and verified to work ?

                How to check this in a reliable way? Running inside QtCreator is not enough?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Mark81
                Oh, i though it was other pc. misread :)
                Yep, driver wise is should be good enough test if runs in Creator.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Hi,

                  Are you building inside your sources ?

                  If not, then you don't pass the correct path to the --qmldir option.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  3
                  • M Offline
                    M Offline
                    Mark81
                    wrote on last edited by
                    #9

                    Ok, now I understand. You're saying I have to set the --qmldir path to the source directory where my .qml files actually are. I didn't understand that and I was looking for binaries, hence I was passing the output directory because they are embedded in the executable as resources.

                    I will try that and report back the results.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Mark81
                      wrote on last edited by
                      #10

                      Yes. It did the trick. Thanks,

                      1 Reply Last reply
                      1

                      • Login

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