Qt Forum

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

    Loading qml into an area of main.qml

    QML and Qt Quick
    2
    3
    1070
    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.
    • D
      Dolphin last edited by

      I have an application where main.qml has a subtitles bar and then an 'application' area which needs to show a qml 'screen' and the screen needs to keep the subtitle bar up to date.

      The 'application' area needs to show the qml from a dll - each actual application (email, bookreader etc) is in a dll which is all fine on the c++ side (have it working perfectly with widgets) but I just cannot fathom how to load the qml from the dll into the 'application' area. Is there a way without digging too deep into the qml (want to keep it ui only) or am I going to have to have every application have its own subtitle bar?

      1 Reply Last reply Reply Quote 0
      • M
        messi last edited by

        Hi Dolphin

        One solution can be with dynamic QML objects:

        http://qt-project.org/wiki/QML-Dynamic-Objects
        http://harmattan-dev.nokia.com/docs/platform-api-reference/xml/daily-docs/libqt4/qdeclarativedynamicobjects.html
        http://stackoverflow.com/questions/8266464/creating-custom-qml-objects-instances-with-qt-createqmlobject
        http://developer.blackberry.com/cascades/documentation/dev/dynamic_qml/index.html

        The other solution can be realized to get the title from a memberfunction of the MVC model.
        All public slots are accessible from QML.
        A good manual can be found here:
        http://qt.digia.com/Global/Images/Qt/Files/QtEssentialsQtQuick/qml-cpp-integration.pdf

        Happy hacking.

        Best regards

        1 Reply Last reply Reply Quote 0
        • D
          Dolphin last edited by

          Quick look seems like you have given me an answer, I will get on with the coding. BIG thanks

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