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. module "QtQuick.Controls" is not installed (static Qt 64bit Win10)

module "QtQuick.Controls" is not installed (static Qt 64bit Win10)

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 3.1k 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.
  • M Offline
    M Offline
    Manfred
    wrote on last edited by
    #1

    Hello all,

    I have built Qt 5.5.1 statically for Windows10 (using MinGW) and I'm trying to build a simple Qml app using this 64 bit kit.
    here is the content of main.cpp:

    QGuiApplication app(argc, argv);
    TestApp testApp;
    QQmlApplicationEngine engine;
    QQmlContext* context = engine.rootContext();
    
    engine.addImportPath( QStringLiteral("/qml") );
    engine.addImportPath( QStringLiteral("/qml/QtQuick") );
    engine.addImportPath( QStringLiteral("/qml/QtQuick/Controls") );
    engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
    

    Here the content of main.qml

    import QtQuick 2.5
    import QtQuick.Window 2.2
    import QtQuick.Controls 1.1
    
    Window {
        visible: true
    
        width: Screen.width
        height: Screen.height
            Button {
                id: runButton
                anchors.verticalCenter: parent.verticalCenter
                text: "Click Me!"
                width: implicitWidth
                height: implicitHeight
                onClicked: {
                }
            }
    }
    

    The exe gets compiled just fine but when I launch it I get the runtime error
    "module "QtQuick.Controls" is not installed"

    I've been searching on the forums and googled a lot but I didn't find a solution.
    Do you guys have some idea

    Thanks in advance!
    regards
    Manfred

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Eeli K
      wrote on last edited by
      #2

      Have you deployed the app? Used windeployqt? Anyways, the Quick Controls QML code must also be copied to your local app directory, do you have them in the locations which you have given to engine.addImportPath? They can be copied from the binary Qt distribution, this is what windeployqt does. I suppose you have checked that you have actually compiled Quick Controls c++ code into you static build beforehand (I don't know if it's possible to leave them out, I'm not familiar with static builds).

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Manfred
        wrote on last edited by
        #3

        Hi Eeli,

        Yes, I have used windeployqt_64 but it does not copy anything, I suppose because Qt is statically linked.

        here is what winseployqt prints after it has finished:

        Warnings while parsing QML type information of C:/Qt/qt-everywhere-enterprise-src-5.5.1/qtbase/qml/QtCharts:
        C:\Qt\qt-everywhere-enterprise-src-5.5.1\qtbase\qml\QtCharts\plugins.qmltypes:1:24: Reading only version 1.1 parts.
        C:\Qt\qt-everywhere-enterprise-src-5.5.1\qtbase\qml\QtCharts\plugins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
        

        Then I copied manually the whole qml folder to the folder where my exe is. So it should be able to find it.

        Qtquickcontrols should be compiled and linked correctly, otherwise I would have had linker problems, wouldn't I ?

        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