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. [Solved]Create a plugin from code that also uses QML.

[Solved]Create a plugin from code that also uses QML.

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 686 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.
  • E Offline
    E Offline
    ealione
    wrote on 19 Feb 2015, 14:08 last edited by
    #1

    Hi everyone,

    I have some code that also relies a few qml objects that I load into my other c++ classes. I want to create a plugin from this code, something I have done in the past, but this time I am not sure how (or even if possible) to deal with the qml files that my code needs.

    What will happen to them, do I have to include them somewhere?

    The reason I am asking is because I did try to create my plugin as a test. I was expecting to see a qml button show up, instead all I got was a white background.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexleutgoeb
      wrote on 22 Feb 2015, 19:23 last edited by
      #2

      Hi,

      How are you referencing your QML items in your C++ code? Is it a pure C++ plugin or a QtQuickItem plugin? In general you can add the QML files to a resource file with a matching qmldir file to get them registered correctly when loading up your plugin.

      Cheers,
      Alex from V-Play

      1 Reply Last reply
      0
      • E Offline
        E Offline
        ealione
        wrote on 23 Feb 2015, 07:44 last edited by
        #3

        Indeed, it was only recently that I learned you are able to do that.
        Thanks for your help.

        1 Reply Last reply
        0

        1/3

        19 Feb 2015, 14:08

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved