Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Not launch Qt application on Windows.
Forum Updated to NodeBB v4.3 + New Features

Not launch Qt application on Windows.

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 2 Posters 2.1k 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.
  • T Offline
    T Offline
    tatsy
    wrote on 6 Oct 2017, 06:08 last edited by tatsy 10 Jun 2017, 07:02
    #1

    I am developing a desktop software using Qt.
    The main problem uses "QApplication" while it only uses "Core" plugin.
    I did so because I plan to use "Widget" plugin in the future.

    The problem that happened to me is, seemingly, a common problem.
    When I try to launch the application, the following error messages are displayed.

    This application failed to start because it could not find or load the Qt platform plugin "windows". in "C:\Qt\5.9.1\msvc2017_64\plugins\platforms"

    As I googled it this problem, the most solution says, the environment path QT_QPA_PLATFORM_PLUGIN_PATH properly.

    As shown in the last error message, I set this environment path to C:\Qt\5.9.1\msvc2017_64\plugins\platforms. However, as the error message indicates, the problem was not resolved (I checked qwindows.dll exists in the above QPA path).

    The development environment that I use is listed below.

    OS: Windows 8 Home Edition (64bit)
    Qt: Qt 5.9.1 (I also tested 5.9 and 5.8, but the same problem occurred)
    Compiler: MSVC C++ Compiler 2017 (x64)

    If anyone experienced the same or similar problem, could you please tell me the solution?
    Thank you in advance for your help.

    R 1 Reply Last reply 6 Oct 2017, 06:48
    0
    • T tatsy
      6 Oct 2017, 06:08

      I am developing a desktop software using Qt.
      The main problem uses "QApplication" while it only uses "Core" plugin.
      I did so because I plan to use "Widget" plugin in the future.

      The problem that happened to me is, seemingly, a common problem.
      When I try to launch the application, the following error messages are displayed.

      This application failed to start because it could not find or load the Qt platform plugin "windows". in "C:\Qt\5.9.1\msvc2017_64\plugins\platforms"

      As I googled it this problem, the most solution says, the environment path QT_QPA_PLATFORM_PLUGIN_PATH properly.

      As shown in the last error message, I set this environment path to C:\Qt\5.9.1\msvc2017_64\plugins\platforms. However, as the error message indicates, the problem was not resolved (I checked qwindows.dll exists in the above QPA path).

      The development environment that I use is listed below.

      OS: Windows 8 Home Edition (64bit)
      Qt: Qt 5.9.1 (I also tested 5.9 and 5.8, but the same problem occurred)
      Compiler: MSVC C++ Compiler 2017 (x64)

      If anyone experienced the same or similar problem, could you please tell me the solution?
      Thank you in advance for your help.

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 6 Oct 2017, 06:48 last edited by raven-worx 10 Jun 2017, 06:48
      #2

      @tatsy said in Not launch Qt application on Windows.:

      As I googled it this problem, the most solution says, the environment path QT_QPA_PLATFORM_PLUGIN_PATH properly.
      As shown in the last error message, I set this environment path to C:\Qt\5.9.1\msvc2017_64\plugins\platforms.

      set it to the plugins folder, instead of the platforms folder.

      Also did you read this?

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • T Offline
        T Offline
        tatsy
        wrote on 6 Oct 2017, 06:53 last edited by
        #3

        Hi @raven-worx

        Thank you very much for the reply.

        Yes, I read that post, and I also tested to set the QT_QPA_..._PATH to the plugin folder, instead of the platform folder.

        To avoid any misunderstandings, I tested it again now, but the problem was not solved.

        Anyway, thank you very much for your advice.

        R 1 Reply Last reply 6 Oct 2017, 06:55
        0
        • T tatsy
          6 Oct 2017, 06:53

          Hi @raven-worx

          Thank you very much for the reply.

          Yes, I read that post, and I also tested to set the QT_QPA_..._PATH to the plugin folder, instead of the platform folder.

          To avoid any misunderstandings, I tested it again now, but the problem was not solved.

          Anyway, thank you very much for your advice.

          R Offline
          R Offline
          raven-worx
          Moderators
          wrote on 6 Oct 2017, 06:55 last edited by
          #4

          @tatsy said in Not launch Qt application on Windows.:

          Yes, I read that post

          there are many other possible solutions.
          The easiest is to use windeployqt tool

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          1
          • T Offline
            T Offline
            tatsy
            wrote on 6 Oct 2017, 07:01 last edited by
            #5

            Actually, I compile the program on a computer and run the program on that computer (without deployment).

            Also in this case, does the solution to use windeployqt tool work?

            What was strange was that it originally ran on that computer and it suddenly got not to work.

            I tested the same program on the different computer (Win10 64bit), it properly worked.

            Do you have any idea?

            R 1 Reply Last reply 6 Oct 2017, 07:04
            0
            • T tatsy
              6 Oct 2017, 07:01

              Actually, I compile the program on a computer and run the program on that computer (without deployment).

              Also in this case, does the solution to use windeployqt tool work?

              What was strange was that it originally ran on that computer and it suddenly got not to work.

              I tested the same program on the different computer (Win10 64bit), it properly worked.

              Do you have any idea?

              R Offline
              R Offline
              raven-worx
              Moderators
              wrote on 6 Oct 2017, 07:04 last edited by
              #6

              @tatsy said in Not launch Qt application on Windows.:

              Also in this case, does the solution to use windeployqt tool work?

              all the tool does is to copy the needed libs to the exe. Since the default paths to look for libs is the folder of the exe it will work everywhere without setting any env variables etc.
              I think the VC runtime libs are not copied. But you would notice this with a different error.

              --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
              If you have a question please use the forum so others can benefit from the solution in the future

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tatsy
                wrote on 6 Oct 2017, 07:12 last edited by
                #7

                Hi @raven-worx,

                I tested windeployqt.exe and the problem was fiexed.
                So, this means that this kind of Qt programs depend on many other env. paths other than QT_QPA_..._PATH?

                At any rate, thank you very much for your help.
                (to be honest, this problem has annoyed to me for a couple of days...)

                R 1 Reply Last reply 6 Oct 2017, 10:43
                0
                • T tatsy
                  6 Oct 2017, 07:12

                  Hi @raven-worx,

                  I tested windeployqt.exe and the problem was fiexed.
                  So, this means that this kind of Qt programs depend on many other env. paths other than QT_QPA_..._PATH?

                  At any rate, thank you very much for your help.
                  (to be honest, this problem has annoyed to me for a couple of days...)

                  R Offline
                  R Offline
                  raven-worx
                  Moderators
                  wrote on 6 Oct 2017, 10:43 last edited by
                  #8

                  @tatsy said in Not launch Qt application on Windows.:

                  So, this means that this kind of Qt programs depend on many other env. paths other than QT_QPA_..._PATH?

                  Not necessarily env variables. The env variables are jsut a way to quickly add some paths without recompiling the application.
                  In the link i've posted, at the very bottom you can see methods to set the paths to searching for plugins via code

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply
                  0

                  1/8

                  6 Oct 2017, 06:08

                  • Login

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