Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Fail to run statically compiled executable - plugin "qtquickcontrolsplugin" not found
Forum Update on Monday, May 27th 2025

Fail to run statically compiled executable - plugin "qtquickcontrolsplugin" not found

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 1 Posters 943 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.
  • L Offline
    L Offline
    Lencho
    wrote on 24 Apr 2019, 19:39 last edited by Lencho
    #1

    Hello,
    Running into a little problem when trying to launch a program built with a statically compiled version of 5.12.1.
    To be clear, the compilation itself is running fine and running the program when built with a "dynamic" kit, either inside QtCreator or launching the executable, is also working fine. The problem I'm experiencing is exactly the same on Windows 10 and Linux (Debian 9).
    Also note that it used to work, but unfortunately I haven't tested the static build regularly so I'm not sure what introduced the problem.
    To get to the point, when launching the static version of the program, either from QtCreator or the executable, I get:

    QQmlApplicationEngine failed to load component
    qrc:/views/MainView.qml:31 Type MessageDialog unavailable
    qrc:/qt-project.org/imports/QtQuick/Dialogs/DefaultMessageDialog.qml:140 Type Button unavailable
    file::/qt-project.org/imports/QtQuick/Controls/qmldir:-1 module ":.qt-project.imports.QtQuick.Controls" plugin "qtquickcontrolsplugin" not found
    
    

    Which seem to lead to a reference / import problem for QtQuick.
    The content of the file in question (on my Linux install: /opt/Qt/5.12.1_static/qml/QtQuick/Controls) is:

    module QtQuick.Controls
    plugin qtquickcontrolsplugin
    classname QtQuickControls1Plugin
    typeinfo plugins.qmltypes
    designersupported
    depends QtQuick.Window 2.2
    depends QtQuick.Layouts 1.0
    

    And I see that DefaultMessageDialog.qml from the Qt source is importing QtQuick.Controls 1.2 as well as QtQuick.Controls.Private 1.0

    Any idea where it could come from? Am I'm not linking something correctly? A QML import in the pro file maybe (not )?
    Thank you!

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Lencho
      wrote on 25 Apr 2019, 08:22 last edited by
      #2

      Completing with further testing:
      I realized the MessageDialog in question, from the error message, was unjustly associated with the Qt.labs.platform plugin although my import was QtQuick.Dialog 1.12. (Pressing F1 sent me to the documentation for labs.platform). Which would explain some inner component was not found?
      I used the platform plugin somewhere else in my code, does this explain that it's trying to use it elsewhere instead of the Dialog plugin?
      [Doesn't seem so, I replaced it everywhere and I get the same problem.]

      Anyway, changing my import to Qt.labs.platform 1.0 and adapting my MessageDialog, I now get:

      QQmlApplicationEngine failed to load component
      qrc:/views/MainView.qml:4 module "Qt.labs.platform" plugin "qtlabsplatformplugin" not found
      

      Which doesn't help me much, I guess the problem is the same only now it's looking for something else.
      Thanks for your help,

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Lencho
        wrote on 25 Apr 2019, 09:12 last edited by Lencho
        #3

        Me again...
        Took the opposite approach and replaced Qt.Dialogs everywhere with Qt.labs.platform.
        The application now runs, but whenever I try to open a MessageDialog, it complaints:

        ERROR: No native MessageDialog implementation available.
        Qt Labs Platform requires Qt Widgets on this setup.
        Add 'QT += widgets' to .pro nd create a QApplication in main().
        

        (FileDialog and FolderDialog are OK...)
        So, it's pretty explicit, but I don't want to do that, I'd like to understand why it's not working anymore with regular QML dialogs from Qt.Dialogs.
        Why is the labs module reachable but not the Dialogs one?
        Thanks,

        1 Reply Last reply
        0
        • L Offline
          L Offline
          Lencho
          wrote on 25 Apr 2019, 12:54 last edited by
          #4

          Related to this kind of problems / conflicts maybe?

          1 Reply Last reply
          0

          1/4

          24 Apr 2019, 19:39

          • Login

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