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. QQML Component: Component is Not Ready
Forum Update on Monday, May 27th 2025

QQML Component: Component is Not Ready

Scheduled Pinned Locked Moved Solved QML and Qt Quick
10 Posts 4 Posters 2.6k 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.
  • C Offline
    C Offline
    celica
    wrote on last edited by
    #1

    Hello Folks
    Quick query for you:
    I am trying to embed some QML componenets into a pretty large existing C++/QT project built in visual studio 2013
    I've read every thread on here with no joy
    My QML is so simple:

    **import QtQuick.Controls 2.0
    import QtQuick 2.0

    Button {
    objectName: "buttonTest"
    }**

    My C++ is:

    QQmlEngine engine;
    
    QQmlComponent component(&engine, QUrl(QStringLiteral("qrc:/aos.qml")));
    
    QObject *object = component.create();
    QObject* item = object->findChild<QObject *>("buttonTest");
    

    I've tried both below, with still the same error QQML Component: Component is Not Ready:

    QQmlComponent component(&engine, QUrl(QStringLiteral("qrc:/aos.qml")));
    QQmlComponent component(&engine, QUrl::fromLocalFile(QDir::currentPath() + "\Resources\videos\aos.qml"));

    1 Reply Last reply
    0
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on last edited by
      #2

      Have you tried to print component.errors()?

      1 Reply Last reply
      0
      • C Offline
        C Offline
        celica
        wrote on last edited by
        #3

        @IntruderExcluder said in QQML Component: Component is Not Ready:

        component.errors()

        No I haven't tried that, I will now though. Thanks
        What would be the best way to go about that?

        1 Reply Last reply
        0
        • IntruderExcluderI Offline
          IntruderExcluderI Offline
          IntruderExcluder
          wrote on last edited by
          #4

          You can use QDebug to print errors to console:

          #include <QDebug>
          ...
          qDebug() << component.errors();
          

          They are pretty readable. If you do not know what errors mean, you can post them here.

          C 2 Replies Last reply
          1
          • IntruderExcluderI IntruderExcluder

            You can use QDebug to print errors to console:

            #include <QDebug>
            ...
            qDebug() << component.errors();
            

            They are pretty readable. If you do not know what errors mean, you can post them here.

            C Offline
            C Offline
            celica
            wrote on last edited by
            #5

            @IntruderExcluder Thats great, thanks a lot for the advice. I'll let you know how it goes

            1 Reply Last reply
            0
            • IntruderExcluderI IntruderExcluder

              You can use QDebug to print errors to console:

              #include <QDebug>
              ...
              qDebug() << component.errors();
              

              They are pretty readable. If you do not know what errors mean, you can post them here.

              C Offline
              C Offline
              celica
              wrote on last edited by
              #6

              @IntruderExcluder That debug was great advice and pointed me to my issue.
              The issue been - module “QtQuick.Controls” is not installed
              But when I go to the QT Project Settings within visual studio the option to add this module (Quick Controls 2) is greyed out.
              I can add Qt Quick & Qt Quick Widgets no problem
              Would you know how to install Quick Controls for Visual Studio 2013 & QT5.5 ?

              jsulmJ 1 Reply Last reply
              0
              • C celica

                @IntruderExcluder That debug was great advice and pointed me to my issue.
                The issue been - module “QtQuick.Controls” is not installed
                But when I go to the QT Project Settings within visual studio the option to add this module (Quick Controls 2) is greyed out.
                I can add Qt Quick & Qt Quick Widgets no problem
                Would you know how to install Quick Controls for Visual Studio 2013 & QT5.5 ?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @celica said in QQML Component: Component is Not Ready:

                Would you know how to install Quick Controls for Visual Studio 2013 & QT5.5 ?

                Not possible.
                See https://doc.qt.io/qt-5/qtquickcontrols-index.html
                "The module was introduced in Qt 5.7".

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                C 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @celica said in QQML Component: Component is Not Ready:

                  Would you know how to install Quick Controls for Visual Studio 2013 & QT5.5 ?

                  Not possible.
                  See https://doc.qt.io/qt-5/qtquickcontrols-index.html
                  "The module was introduced in Qt 5.7".

                  C Offline
                  C Offline
                  celica
                  wrote on last edited by
                  #8

                  @jsulm Thanks, that would explain it so.
                  Is it possible to generate a tumbler from 5.5 ?

                  JKSHJ 1 Reply Last reply
                  0
                  • C celica

                    @jsulm Thanks, that would explain it so.
                    Is it possible to generate a tumbler from 5.5 ?

                    JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by JKSH
                    #9

                    @celica said in QQML Component: Component is Not Ready:

                    Is it possible to generate a tumbler from 5.5 ?

                    As I said in https://forum.qt.io/topic/110586/tumbler-and-qt5-5, add import QtQuick.Extras 1.4 to your *.qml file

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    C 1 Reply Last reply
                    0
                    • JKSHJ JKSH

                      @celica said in QQML Component: Component is Not Ready:

                      Is it possible to generate a tumbler from 5.5 ?

                      As I said in https://forum.qt.io/topic/110586/tumbler-and-qt5-5, add import QtQuick.Extras 1.4 to your *.qml file

                      C Offline
                      C Offline
                      celica
                      wrote on last edited by
                      #10

                      @JKSH Thanks for the input. import QtQuick.Extras 1.4 still gives me the QML component not found error.
                      So i updated the main project to visual studio 2017 with QT 5.12 and now I have it working.

                      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