Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Component is not ready message
Qt 6.12 LTS is out! See what's new in the release blog

Component is not ready message

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 720 Views 1 Watching
  • 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.
  • G Offline
    G Offline
    gabor53
    wrote on last edited by
    #1

    Hi,
    I'm trying to load busyIndicator from Qt Quick.
    My qml file:

    import QtQuick 2.4
    import QtQuick.Controls 1.3
    import QtQuick.Window 2.2
    
    ApplicationWindow {
        id: windowView
        width: 100
        height: 100
        visible: true
    
        modality: Qt.ApplicationModal
        color: "#00000000"
        flags: Qt.FramelessWindowHint | Qt.WA_TranslucentBackground
    
        BusyIndicator {
           id: busyIndication
           anchors.centerIn: parent
        }
    }
    

    main.cpp:

    #include "busytest.h"
    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    #include <QQmlProperty>
    #include <QQmlEngine>
    #include <QQmlComponent>
    #include <QFile>
    #include <QObject>
    #include <QQuickView>
    
    int main(int argc, char* argv[]) {
      QGuiApplication app(argc, argv);
    
    //  QQmlApplicationEngine engine;
    //  engine.load(QUrl(QStringLiteral("qrc:/busy/main.qml")));
    //  if (engine.rootObjects().isEmpty())
    //    return -1;
    
      QQmlEngine engine;
      QQmlComponent component(&engine, QUrl::fromLocalFile ("qrc:/busy/main.qml"));
      QObject* object = component.create ();
    
      delete object;
      return app.exec();
    }
    
    

    I get no error message when I build the project, but when I run it it always says QQmlComponent: Component is not ready and nothing happens. The section commented out in main.cpp works fine. What is wrong with the second version?
    Thank you for your help.

    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
    • Unsolved