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. Linux application failed to run with error: qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/"
Forum Updated to NodeBB v4.3 + New Features

Linux application failed to run with error: qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/"

Scheduled Pinned Locked Moved Solved Installation and Deployment
2 Posts 1 Posters 1.3k 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.
  • S Offline
    S Offline
    Sheetal Deshpande
    wrote on last edited by Sheetal Deshpande
    #1

    Hi all,
    I have built QT 5.14.1 on linux with -qt-xcb flag in configure and when I try to run my application with these QT libs and plugins, I get following error:

    *****qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/"
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    Available platform plugins are: eglfs (from plugins/platforms/), linuxfb (from plugins/platforms/), minimal (from plugins/platforms/), minimalegl (from plugins/platforms/), offscreen (from plugins/platforms/), vnc (from plugins/platforms/), webgl (from plugins/platforms/), xcb (from plugins/platforms/), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.**


    I have set QT_QPA_PLATFORM_PLUGIN_PATH=plugins/platforms/ and placed this folder where my program is. Also I tried setting QT_DEBUG_PLUGINS=1 and ran, but could not find any error, except at the end which gives error as mentioned above.
    Also I ran ldd for exe, qxcb plugin so, and related so and all dependent libs were present in output.

    Strange thing is earlier I had built QT 5.13.2 with exact same configuration and same procedure to run the application and I did not get any error.

    Please suggest if you have any other thing that can be tried out here. Or is there any issue with my build that you suspect?

    Thanks in advance.
    Sheetal

    S 1 Reply Last reply
    0
    • S Sheetal Deshpande

      Hi all,
      I have built QT 5.14.1 on linux with -qt-xcb flag in configure and when I try to run my application with these QT libs and plugins, I get following error:

      *****qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/"
      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

      Available platform plugins are: eglfs (from plugins/platforms/), linuxfb (from plugins/platforms/), minimal (from plugins/platforms/), minimalegl (from plugins/platforms/), offscreen (from plugins/platforms/), vnc (from plugins/platforms/), webgl (from plugins/platforms/), xcb (from plugins/platforms/), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.**


      I have set QT_QPA_PLATFORM_PLUGIN_PATH=plugins/platforms/ and placed this folder where my program is. Also I tried setting QT_DEBUG_PLUGINS=1 and ran, but could not find any error, except at the end which gives error as mentioned above.
      Also I ran ldd for exe, qxcb plugin so, and related so and all dependent libs were present in output.

      Strange thing is earlier I had built QT 5.13.2 with exact same configuration and same procedure to run the application and I did not get any error.

      Please suggest if you have any other thing that can be tried out here. Or is there any issue with my build that you suspect?

      Thanks in advance.
      Sheetal

      S Offline
      S Offline
      Sheetal Deshpande
      wrote on last edited by
      #2

      @Sheetal-Deshpande said in Linux application failed to run with error: qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/":

      Hi all,
      I have built QT 5.14.1 on linux with -qt-xcb flag in configure and when I try to run my application with these QT libs and plugins, I get following error:

      *****qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "plugins/platforms/"
      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

      Available platform plugins are: eglfs (from plugins/platforms/), linuxfb (from plugins/platforms/), minimal (from plugins/platforms/), minimalegl (from plugins/platforms/), offscreen (from plugins/platforms/), vnc (from plugins/platforms/), webgl (from plugins/platforms/), xcb (from plugins/platforms/), eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.**


      I have set QT_QPA_PLATFORM_PLUGIN_PATH=plugins/platforms/ and placed this folder where my program is. Also I tried setting QT_DEBUG_PLUGINS=1 and ran, but could not find any error, except at the end which gives error as mentioned above.
      Also I ran ldd for exe, qxcb plugin so, and related so and all dependent libs were present in output.

      Strange thing is earlier I had built QT 5.13.2 with exact same configuration and same procedure to run the application and I did not get any error.

      Please suggest if you have any other thing that can be tried out here. Or is there any issue with my build that you suspect?

      Thanks in advance.
      Sheetal

      Update: Issue is resolved. I was adding one windows specific flag in main.cpp for creating qapplication, which was triggering windows plugin look up. So I removed it for linux code and its not giving that error.

      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