Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Error:QQmlComponent:Component is not ready

    QML and Qt Quick
    3
    3
    3241
    Loading More Posts
    • 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.
    • J
      Javeria last edited by

      I am simply trying to set context property for my QML file with an Object but i am getting this error:
      @
      QQmlEngine engine;
      DetectSquares m;
      engine.rootContext()->setContextProperty("m",&m);
      QQmlComponent component(&engine, QUrl::fromLocalFile("qrc:/main.qml"));
      component.create();@

      1 Reply Last reply Reply Quote 0
      • W
        wthung last edited by

        That means something wrong in the main.qml.
        Usually I use qmlviewer to debug the qml file since it outputs more informative data than "Component is not ready".

        1 Reply Last reply Reply Quote 0
        • p3c0
          p3c0 Moderators last edited by

          You can also use "errors()":http://doc.qt.io/qt-5/qqmlcomponent.html#errors.

          157

          1 Reply Last reply Reply Quote 0
          • First post
            Last post