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. White screen on launching application - Qt QML
Forum Updated to NodeBB v4.3 + New Features

White screen on launching application - Qt QML

Scheduled Pinned Locked Moved Installation and Deployment
16 Posts 3 Posters 9.2k 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.
  • J Offline
    J Offline
    jere12
    wrote on last edited by
    #1

    Hello everybody,
    i followed this guide to deploy an Application on Windows ("Here":http://qt-project.org/wiki/Deploy_an_Application_on_Windows).

    I did steps 1, 2, 3 and 4. But when I launch the exe, I have a white screen with no error message.

    Have you an idea of ​​my mistake please?

    Thanks.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      White screen is usually shown when the QML engine encounters an error (missing QML file, wrong import, etc.). You need get the stderr output for that application, it will tell you exactly what went wrong. On Windows I think you can also inspect some system logs and the messages will be there.

      (Z(:^

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jere12
        wrote on last edited by
        #3

        Ok, but Qt is new for me :(
        How can I get the stderr output when I run this application as a standalone app and not in Qt Creator ?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          t3685
          wrote on last edited by
          #4

          Have you tried using the Windows command line to start your exe

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jere12
            wrote on last edited by
            #5

            No, i didn't.
            I'll do that tomorrow and I'll let you know :)

            1 Reply Last reply
            0
            • J Offline
              J Offline
              jere12
              wrote on last edited by
              #6

              Ok, I just try to use WIndows command line to start the exe but there is no message displayed :(

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                That is because Windows is crap. Don't worry, you can still read the logs. Try "this":http://stackoverflow.com/questions/482678/how-to-capture-stderr-on-windows-dos or "this":http://support.microsoft.com/kb/308427.

                (Z(:^

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jere12
                  wrote on last edited by
                  #8

                  There is no displayed error for both methods.
                  Should I deploy the application in debug or release? It is currently in release.

                  1 Reply Last reply
                  0
                  • sierdzioS Offline
                    sierdzioS Offline
                    sierdzio
                    Moderators
                    wrote on last edited by
                    #9

                    Good idea, try with a debug build.

                    (Z(:^

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jere12
                      wrote on last edited by
                      #10

                      No message either :(
                      I read on forums that it could be a problem for QML plugin. However, I have imported all the files listed in the tutorial.

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        jere12
                        wrote on last edited by
                        #11

                        I just found a solution.
                        I added in the application folder a directory qml/APPLICATION_NAME/ with qml files. Now it works.

                        So I have a question. Is it mandatory to add the folder or can it be included in the exe?

                        1 Reply Last reply
                        0
                        • sierdzioS Offline
                          sierdzioS Offline
                          sierdzio
                          Moderators
                          wrote on last edited by
                          #12

                          It is not mandatory. You can include all QML files (and other files, too) using "Qt Resource Sytem":http://qt-project.org/doc/qt-5/resources.html.

                          (Z(:^

                          1 Reply Last reply
                          0
                          • J Offline
                            J Offline
                            jere12
                            wrote on last edited by
                            #13

                            Ok, thank you very much. This is very useful !
                            However, do you know how to automate this in QtCreator?

                            1 Reply Last reply
                            0
                            • sierdzioS Offline
                              sierdzioS Offline
                              sierdzio
                              Moderators
                              wrote on last edited by
                              #14

                              Yes, Qt Creator will basically do all the work for you, don't worry. Just open your project and select Add New...->Qt->Qt Resource File. It will add the file, and you can put your QML files there through an easy, built-in GUI tool.

                              You also need to change one thing in your code: when you set the main QML file source (to QtQuick2ApplicationViewer, QQuickView, QQmlEngine, etc.), you need to change the path to this:
                              @
                              :/prefix/myMainQmlFIle.qml
                              //or
                              qrc:///prefix/myMainQmlFIle.qml
                              @

                              (Z(:^

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                jere12
                                wrote on last edited by
                                #15

                                Ok, thank you for your answers, I learned a lot from you :)

                                Have a good day.

                                1 Reply Last reply
                                0
                                • sierdzioS Offline
                                  sierdzioS Offline
                                  sierdzio
                                  Moderators
                                  wrote on last edited by
                                  #16

                                  Thank you, you are welcome :-)

                                  (Z(:^

                                  1 Reply Last reply
                                  0

                                  • Login

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