Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75531

'Could not find the Qt platform plugin' error in development environment

    XMLWordPrintable

Details

    Description

      Qt is configured with rather long configure:

      .\configure.bat -prefix C:\manualQt\5.12.2\preQt4WinSVN -extprefix C:\manualQt\5.12.2\Qt4WinSVN -debug-and-release -commercial -confirm-license -opengl desktop -skip qtwebengine -skip qt3d -skip qtlocation -skip qtxmlpatterns -skip qtcanvas3d -skip qtquickcontrols -skip qtsvg -skip qtdatavis3d -skip qtconnectivity -skip qtcharts -skip qtdoc -skip qtsensors -skip qtscxml -skip qtserialbus -skip qtserialport -skip qtwebsockets -skip qtx11extras -skip qtwinextras -skip qtremoteobjects -skip qtwebchannel -skip qtactiveqt -skip qtgamepad -skip qtpurchasing -skip qtandroidextras -skip qtwebview -skip qtnetworkauth -skip qtmacextras -skip qtspeech -skip qtwebglplugin

      and then built and installed. Now, running any application fails with qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "". And after that is manually fixed by adding plugin directory with QCoreApplication::addLibraryPath(), then all Qt Quick applications complain about missing Qt Quick imports. Again, setting QML2_IMPORT_PATH manually fixes the problem.

      If we print the QCoreApplication::libraryPaths() before QApplication is created, it is empty. Debugging the function shows that installPathPlugins = QLibraryInfo::location(QLibraryInfo::PluginsPath); contains correct path, but QFile::exists() returns false for it.

      This problem has been reproduced on Windows 7 and 10 with MinGW 64bit and on Linux with the above configuration.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jbornema Joerg Bornemann
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes