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. Qt local machine show "This application failed to start because no Qt platform plugin could be initialized"
Forum Updated to NodeBB v4.3 + New Features

Qt local machine show "This application failed to start because no Qt platform plugin could be initialized"

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 2 Posters 1.9k Views
  • 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
    actzhy
    wrote on last edited by
    #1

    I deleted Qt directly and reinstalled it, but when I run the old builded qt application or newly build an app and run, it pop the message that "This application failed to start because no Qt platform plugin could be initialized". I know that copying platforms folder to the .exe file folder may work, but how can i get rid of copying the folder every time through setting environment path or some other ways?
    i have set PATH to
    "D:\Qt\Qt5.12.0\5.12.0\msvc2017\bin"
    "D:\Qt\Qt5.12.0\5.12.0\msvc2017\plugins"(which contains platforms folder)
    “D:\Qt\Qt5.12.0\Tools\QtCreator\bin”(also contains platforms) ,but neither works.

    aha_1980A 1 Reply Last reply
    0
    • A actzhy

      I deleted Qt directly and reinstalled it, but when I run the old builded qt application or newly build an app and run, it pop the message that "This application failed to start because no Qt platform plugin could be initialized". I know that copying platforms folder to the .exe file folder may work, but how can i get rid of copying the folder every time through setting environment path or some other ways?
      i have set PATH to
      "D:\Qt\Qt5.12.0\5.12.0\msvc2017\bin"
      "D:\Qt\Qt5.12.0\5.12.0\msvc2017\plugins"(which contains platforms folder)
      “D:\Qt\Qt5.12.0\Tools\QtCreator\bin”(also contains platforms) ,but neither works.

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @actzhy said in Qt local machine show "This application failed to start because no Qt platform plugin could be initialized":

      "D:\Qt\Qt5.12.0\5.12.0\msvc2017\plugins"(which contains platforms folder)
      “D:\Qt\Qt5.12.0\Tools\QtCreator\bin”(also contains platforms) ,but neither works.

      And that is exactly the problem with adding entries to PATH (as well as with copying DLLs to \Windows\System).

      If these platform folders are incompatible, you may pick up the wrong one and your app don't start.

      I'd really advice against putting Qt to PATH. In Creator, that settings are correct automatically, so your app runs. You can even open a terminal with that run environment from Creator.

      Outside Creator, you should deploy your app with e.g. windeployqt.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      1
      • A Offline
        A Offline
        actzhy
        wrote on last edited by
        #3

        Thank you for reply.
        Normally the app shoud run correctly on a local Qt environment PC, even outside Creator.
        I have uninstalled Qt with uninstall tool and reinstalled it again, and the problem no longer appears

        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