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. Error:QQmlComponent:Component is not ready
QtWS25 Last Chance

Error:QQmlComponent:Component is not ready

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 3.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.
  • J Offline
    J Offline
    Javeria
    wrote on last edited by
    #1

    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
    0
    • W Offline
      W Offline
      wthung
      wrote on last edited by
      #2

      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
      0
      • p3c0P Offline
        p3c0P Offline
        p3c0
        Moderators
        wrote on last edited by
        #3

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

        157

        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