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. Use QtPlugin for dynamical load QML files
Forum Updated to NodeBB v4.3 + New Features

Use QtPlugin for dynamical load QML files

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.6k 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.
  • W Offline
    W Offline
    WeX.tmpvar
    wrote on last edited by
    #1

    Hello! I need to dynamically load QML files in my application. But I need that these files are stored in dynamical libraries. How I can load plugins in my C++ application by using qpluginloader, and use QML files stored in libraries? Thanks.

    Sorry for my english =)

    1 Reply Last reply
    0
    • W Offline
      W Offline
      WeX.tmpvar
      wrote on last edited by
      #2

      Well, I'm paraphrasing. How can I integrate QML files into my application, that they were not just files with the code on the disk?

      Sorry for my english =)

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lgeyer
        wrote on last edited by
        #3

        If it is about just loading files consider using a "binary resource file":http://doc.qt.nokia.com/latest/resources.html#external-binary-resources.

        If you want to provide code too, compile the resources into a "shared library":http://doc.qt.nokia.com/latest/resources.html#compiled-in-resources. Be aware that you might need to "initialize":http://doc.qt.nokia.com/latest/qdir.html#Q_INIT_RESOURCE and "cleanup":http://doc.qt.nokia.com/latest/qdir.html#Q_CLEANUP_RESOURCE your resources then. If you want to intergrate your code or resources directly to the declarative engine see "Extending QML using Qt C++":http://doc.qt.nokia.com/latest/gettingstartedqml.html#extending-qml-using-qt-c.

        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