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. how to make QML shared Libraries and use it
Forum Updated to NodeBB v4.3 + New Features

how to make QML shared Libraries and use it

Scheduled Pinned Locked Moved QML and Qt Quick
qmllibraries
5 Posts 3 Posters 4.7k 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.
  • NavaneethN Offline
    NavaneethN Offline
    Navaneeth
    wrote on last edited by
    #1

    I have some custom made QML controls which contains only .qml files no .CPP.
    I need to share/use it on other projects such that my qml files and its contents will not be visible to third parties.

    How about creating a shared library .dll or .so files of QML files which can be linked during compile time
    OR
    How about creating a plugin library file which can be used during runtime.

    suggestions and helps please.
    Thanks in advance.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      supaiku_
      wrote on last edited by
      #2

      Hi, what you want is called a module in QML.

      See http://doc.qt.io/qt-5/qtqml-modules-topic.html
      and http://doc.qt.io/qt-5/qtqml-modules-qmldir.html

      1 Reply Last reply
      1
      • NavaneethN Offline
        NavaneethN Offline
        Navaneeth
        wrote on last edited by
        #3

        Hi,
        From the documentation i am able to understand that, I have to use qml files as such and provide the entries in qmldir file for each file.
        In this case the QML files are exposed. !!

        Is there is any way QML files can be included in a DLL and use it on another project ?
        If i am misunderstood please the doc please let me know.
        Thank you.

        G 1 Reply Last reply
        0
        • NavaneethN Navaneeth

          Hi,
          From the documentation i am able to understand that, I have to use qml files as such and provide the entries in qmldir file for each file.
          In this case the QML files are exposed. !!

          Is there is any way QML files can be included in a DLL and use it on another project ?
          If i am misunderstood please the doc please let me know.
          Thank you.

          G Offline
          G Offline
          greenhouse
          wrote on last edited by
          #4

          @Navaneeth maybe this can help you http://doc.qt.io/QtQuickCompiler/

          1 Reply Last reply
          0
          • NavaneethN Offline
            NavaneethN Offline
            Navaneeth
            wrote on last edited by
            #5

            @greenhouse , Thank you for your post, it was informative. I have made a lib using the following .pro file.

            TEMPLATE = lib
            TARGET = QMLLibrary
            
            # Input
            RESOURCES += qml.qrc
            CONFIG += qtquickcompiler
            #CONFIG += lib
            

            there are two QML files in qrc file.
            ClickButton.qml CustomButton.qml
            And i have .dll file QMLLibrary.dll in my release folder.
            Now how can i use the those qml components using the lib i generated. ?

            1 Reply Last reply
            1

            • Login

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