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]How to use Declarative Plugins
Forum Updated to NodeBB v4.3 + New Features

[Solved]How to use Declarative Plugins

Scheduled Pinned Locked Moved QML and Qt Quick
9 Posts 4 Posters 4.1k 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.
  • S Offline
    S Offline
    syrianzoro
    wrote on last edited by
    #1

    Please,
    could anyone tell me how to use dlls which was created in \examples\declarative\cppextensions

    Qt is the future

    1 Reply Last reply
    0
    • V Offline
      V Offline
      vsorokin
      wrote on last edited by
      #2

      See "here":http://doc.qt.nokia.com/4.7/gettingstartedqml.html#extending-qml-using-qt-c

      --
      Vasiliy

      1 Reply Last reply
      0
      • S Offline
        S Offline
        syrianzoro
        wrote on last edited by
        #3

        Thankyou Vass

        this topic is not usefull

        Qt is the future

        1 Reply Last reply
        0
        • S Offline
          S Offline
          syrianzoro
          wrote on last edited by
          #4

          I mean if I have just the Dll without any headers how I can use it?

          Qt is the future

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            If you dont have the headers, how should you use the classes? It's not really possible. You can create the headers on your own by hand (which is very error prone) or they only contain plug-ins. But without headers, no class usage (also not from dlls).

            If the dlls contain real plugins, you put them in the same folder as the application. Then they will be found by Qt.

            See in the "documentation":http://doc.qt.nokia.com/4.7/gettingstartedqml.html#importing-a-plugin-in-qml

            bq. The qmlviewer tool imports files that are in the same directory as the application. We can also create a qmldir file containing the locations of QML files we wish to import. The qmldir file can also store locations of plugins and other resources.
            @
            In qmldir:

             Button ./Button.qml
             FileDialog ./FileDialog.qml
             TextArea ./TextArea.qml
             TextEditor ./TextEditor.qml
             EditMenu ./EditMenu.qml
            
             plugin FileDialog plugins__
            

            @

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • S Offline
              S Offline
              syrianzoro
              wrote on last edited by
              #6

              thank you Mr Gerolf Reinwardt

              even if I have the headers I tested all the examples I find no thing

              Qt is the future

              1 Reply Last reply
              0
              • X Offline
                X Offline
                xsacha
                wrote on last edited by
                #7

                Works here and I can't see how it could fail.

                You must have the plugin line in the .qmldir file as Gerolf explained.
                In program.qmldir:
                @plugin FileDialog plugins@
                this means your directory structure should look like:
                @program.qmldir
                plugins/FileDialog.dll@

                • Sacha
                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  syrianzoro
                  wrote on last edited by
                  #8

                  do you meen the file qmldir its contents are this lines

                  Clock 1.0 Clock.qml
                  plugin qmlqtimeexampleplugin

                  when build plugins example:

                  declarative\cppextensions\plugins\com\nokia\TimeExample

                  Qt is the future

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    syrianzoro
                    wrote on last edited by
                    #9

                    ah

                    ok it is clear now

                    thank you Xsacha

                    Qt is the future

                    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