Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Shared Library Dialog

Shared Library Dialog

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 3 Posters 5.1k Views 2 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.
  • kshegunovK kshegunov

    @TigerBunny
    Hello,

    A major requirement is to create "modules" for our application. In Windows we did this with .dll's, some of which contained resources.

    If you mean to load those "modules" at runtime you'd want to research the plugins.

    But this generates the error: "C1083: Cannot open include file: 'QDialog': No such file or directory"

    Probably you have forgotten to add the QT += widgets line in your project file.

    Kind regards.

    T Offline
    T Offline
    TigerBunny
    wrote on last edited by
    #3

    Hi @kshegunov

    I did add QT+= widgets, but it didn't change the error.

    #-------------------------------------------------

    Project created by QtCreator 2016-03-03T10:18:32

    #-------------------------------------------------

    QT -= gui
    QT += widgets

    TARGET = SharedLibTest
    TEMPLATE = lib

    DEFINES += SHAREDLIBTEST_LIBRARY

    SOURCES += sharedlibtest.cpp
    dialog.cpp

    HEADERS += sharedlibtest.h
    sharedlibtest_global.h
    dialog.h

    unix {
    target.path = /usr/lib
    INSTALLS += target
    }

    FORMS +=
    dialog.ui

    I have not researched "plugins". I heard the term and assumed it referred to adding functionality to the IDE. I'll take a look at that.

    ty.

    1 Reply Last reply
    0
    • kshegunovK kshegunov

      @TigerBunny
      Hello,

      A major requirement is to create "modules" for our application. In Windows we did this with .dll's, some of which contained resources.

      If you mean to load those "modules" at runtime you'd want to research the plugins.

      But this generates the error: "C1083: Cannot open include file: 'QDialog': No such file or directory"

      Probably you have forgotten to add the QT += widgets line in your project file.

      Kind regards.

      T Offline
      T Offline
      TigerBunny
      wrote on last edited by
      #4

      @kshegunov, I read the link. Are you sure "plugins" is what I want?

      I simply want to start seeing if Qt has the ability to be modular by loading a dialog inside an application where the dialog is replaceable without recompiling the application. Much like a resource .dll is in Windows.

      Do you know if there is an example of using "plugins" to load a dialog?

      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #5

        hi
        please try/read this small sample
        http://doc.qt.io/qt-5/qtwidgets-tools-echoplugin-example.html

        Plugins can BOTH be to extend the qt. but same method/functionality can also be used to extend any Qt app.
        So its like with DLLS just more modern using interfaces.
        So it can easy be a modul for sharing Dialogs or what ever needed.

        T 1 Reply Last reply
        0
        • mrjjM mrjj

          hi
          please try/read this small sample
          http://doc.qt.io/qt-5/qtwidgets-tools-echoplugin-example.html

          Plugins can BOTH be to extend the qt. but same method/functionality can also be used to extend any Qt app.
          So its like with DLLS just more modern using interfaces.
          So it can easy be a modul for sharing Dialogs or what ever needed.

          T Offline
          T Offline
          TigerBunny
          wrote on last edited by
          #6

          @mrjj

          The example doesn't seem to show a dialog (or any other resource) inside a module. It appears to simply echo text back from a module without any resources to an application.

          Ideally I would like an example already done that demonstrates my goal. If there is none, the next choice would be a tutorial on how to do it.

          Failing all of that, documentation that will give me confidence this will work. I can work from there to create my own example.

          I would very much appreciate a full example.

          mrjjM 1 Reply Last reply
          0
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #7

            Ok. I know no samples that pops a dialog.
            The other examples are about expanding the host application.
            http://doc.qt.io/qt-5/qtwidgets-tools-plugandpaint-example.html

            So im afraid u must keep looking.

            1 Reply Last reply
            0
            • T TigerBunny

              @mrjj

              The example doesn't seem to show a dialog (or any other resource) inside a module. It appears to simply echo text back from a module without any resources to an application.

              Ideally I would like an example already done that demonstrates my goal. If there is none, the next choice would be a tutorial on how to do it.

              Failing all of that, documentation that will give me confidence this will work. I can work from there to create my own example.

              I would very much appreciate a full example.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #8

              @TigerBunny
              Hi
              I was bored. so I modified echo sample to open dialog
              https://www.dropbox.com/s/qzunmovatpbmmai/withdialog.zip?dl=0
              dialog lives in plugin.
              note the UI file is the resource.

              T 1 Reply Last reply
              0
              • mrjjM mrjj

                @TigerBunny
                Hi
                I was bored. so I modified echo sample to open dialog
                https://www.dropbox.com/s/qzunmovatpbmmai/withdialog.zip?dl=0
                dialog lives in plugin.
                note the UI file is the resource.

                T Offline
                T Offline
                TigerBunny
                wrote on last edited by
                #9

                @mrjj, I don't see a UI file. All I get is an error message. Also, there is only 1 project.

                I would expect an example to have 2 projects. One that creates the plugin with the dialog, the other an application that uses it. Are my expectations not correct?

                mrjjM 1 Reply Last reply
                0
                • mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #10

                  ok let me check zip. there should be 2 folders. did u unzip correctly?

                  1 Reply Last reply
                  0
                  • T TigerBunny

                    @mrjj, I don't see a UI file. All I get is an error message. Also, there is only 1 project.

                    I would expect an example to have 2 projects. One that creates the plugin with the dialog, the other an application that uses it. Are my expectations not correct?

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by mrjj
                    #11

                    @TigerBunny
                    hi
                    for me all is in zip ?
                    http://postimg.org/image/hbjkgv7vt/

                    including the UI file. in the plugin folder

                    Make sure you unzip it all. do not click inside the zip file.
                    extract all first.

                    T 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @TigerBunny
                      hi
                      for me all is in zip ?
                      http://postimg.org/image/hbjkgv7vt/

                      including the UI file. in the plugin folder

                      Make sure you unzip it all. do not click inside the zip file.
                      extract all first.

                      T Offline
                      T Offline
                      TigerBunny
                      wrote on last edited by
                      #12

                      @mrjj ,

                      I must have used the wrong extraction procedure. I'm not up on Windows compression, my mistake.

                      I'll take a look. This looks much better. Thanks.

                      mrjjM 1 Reply Last reply
                      0
                      • T TigerBunny

                        @mrjj ,

                        I must have used the wrong extraction procedure. I'm not up on Windows compression, my mistake.

                        I'll take a look. This looks much better. Thanks.

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #13

                        @TigerBunny
                        well windows native zip handling, does "help" one by sort of showing like a folder. :)
                        Note. to add dialog to sample was very little.
                        Just add Dialog via FIle->New and then add include to plugin and change
                        interface function to show ( exec) dialog.

                        T 1 Reply Last reply
                        0
                        • mrjjM mrjj

                          @TigerBunny
                          well windows native zip handling, does "help" one by sort of showing like a folder. :)
                          Note. to add dialog to sample was very little.
                          Just add Dialog via FIle->New and then add include to plugin and change
                          interface function to show ( exec) dialog.

                          T Offline
                          T Offline
                          TigerBunny
                          wrote on last edited by
                          #14

                          @mrjj

                          This works, but I can't find the output file. I assume there is something like a .dll this produces. How do I find it and what would it be called?

                          1 Reply Last reply
                          0
                          • mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by mrjj
                            #15

                            yes its a DLL
                            for me its in
                            E:\build-echoplugin-Desktop_Qt_5_5_0_MinGW_32bit-Debug\plugins

                            The PRO file alters the destination.
                            Its so the main program can find it.

                            look for echoplugind.dll

                            it might also copy to
                            $$[QT_INSTALL_EXAMPLES]/widgets/tools/echoplugin/plugin

                            kshegunovK 1 Reply Last reply
                            0
                            • mrjjM mrjj

                              yes its a DLL
                              for me its in
                              E:\build-echoplugin-Desktop_Qt_5_5_0_MinGW_32bit-Debug\plugins

                              The PRO file alters the destination.
                              Its so the main program can find it.

                              look for echoplugind.dll

                              it might also copy to
                              $$[QT_INSTALL_EXAMPLES]/widgets/tools/echoplugin/plugin

                              kshegunovK Offline
                              kshegunovK Offline
                              kshegunov
                              Moderators
                              wrote on last edited by
                              #16

                              @TigerBunny
                              It seems @mrjj beat me to it. This thread, however, could also be useful for you.

                              Read and abide by the Qt Code of Conduct

                              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