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. Qt plugin API and kdreports library
Forum Updated to NodeBB v4.3 + New Features

Qt plugin API and kdreports library

Scheduled Pinned Locked Moved General and Desktop
13 Posts 4 Posters 4.2k 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.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #1

    Hello,
    I plan to use the GPL version of "KDReports":http://kdab.com/kd-reports library to generate reports in my application. All the functionnalities of my application are provided by plugins. After compiling the KDReports library, when I link one of my plugins with the KDReports library, this plugin is not recognized as a plugin.
    If someone had a similar problem or know something about it, please explain to me.
    Thanks

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      Nobody can help me ?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        Please be patient. All responses here are from volunteers who are working on their own time. If someone has knowledge in the area you need help with, I'm sure they will respond as soon as they can.

        In the mean time, can you provide more information, such as any error messages, platform type, versions of software, or any other data that might help someone understand the specifics of your problem more clearly, please?

        Thanks!

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by
          #4

          Did you follow the tutorials provided?

          bq. KD Reports comes with a manual that provides tutorials and references.  Also, examples are part of the source code that can be customized and used.

          bq. Everything Included
          KD Reports licenses include:
          The full source code.
          A Reference Manual.
          A Programmer’s Manual with step-by-step tutorials.

          Qt Certified Specialist
          www.edalsolutions.be

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on last edited by
            #5

            I followed the tutorials. My problem is that when I link my plugin with kdreports library, my plugin is not recognized as a plugin by the core application. Below is the function which load the plugins
            @
            ...
            foreach(QString fileName, pluginsDir.entryList(QDir::Files))
            {
            QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
            QObject *plugin = loader.instance();

                if(!plugin)
                      qDebug() << "Not a plugin";
                else
                {
                    PxPluginInterface *pxPlugin = qobject_cast<PxPluginInterface*>(plugin);
            
                    if(pxPlugin)
                        m_pluginsList << pxPlugin;
                }
            

            }
            @

            After linking with kdreports library, I always have the message "Not a plugin" and I don't have access to the plugin functionnality, but if I unlink with kdreports, the application works well.

            I'm using the latest QtSDK on Mac OS X Snow Leopard. I had the same problem on GNU/Linux(Fedora).

            1 Reply Last reply
            0
            • EddyE Offline
              EddyE Offline
              Eddy
              wrote on last edited by
              #6

              You could use
              @QString QPluginLoader::errorString () const@
              To get more info about what's wrong.

              Qt Certified Specialist
              www.edalsolutions.be

              1 Reply Last reply
              0
              • ? This user is from outside of this forum
                ? This user is from outside of this forum
                Guest
                wrote on last edited by
                #7

                I have only the message
                @"Cannot load library ..."@

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

                  Have you tried stepping into the QPluginLoader constructor and the instance method?
                  (Don't forget to setup the correct Qt source pathes in Qt Creator).

                  1 Reply Last reply
                  0
                  • ? This user is from outside of this forum
                    ? This user is from outside of this forum
                    Guest
                    wrote on last edited by
                    #9

                    Sorry, I don't understand what you mean. Stepping into with the debugger ?
                    And to setup the correct Qt source paths in Qt Creator

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

                      Just place a breakpoint at line #4 and then step through to find out what's going wrong.

                      For having the Qt sources displayed correctly during debug you might have to install (SDK Maintainance Tool) and setup the Qt sources within Qt Creator (somewhere Options -> Debugger -> Source Pathes).

                      1 Reply Last reply
                      0
                      • Z Offline
                        Z Offline
                        ZapB
                        wrote on last edited by
                        #11

                        Can the system dynamic linker resolve the kdreports library location when trying to load your plugin?

                        Nokia Certified Qt Specialist
                        Interested in hearing about Qt related work

                        1 Reply Last reply
                        0
                        • ? This user is from outside of this forum
                          ? This user is from outside of this forum
                          Guest
                          wrote on last edited by
                          #12

                          Thanks, the system effectively didn't resolve the kdreports library. But I added the path to kdreports to DYLD_LIBRARY_PATH
                          @export DYLD_LIBRARY_PATH = ...@
                          I have to copy the library in /usr/lib before the application works.

                          1 Reply Last reply
                          0
                          • Z Offline
                            Z Offline
                            ZapB
                            wrote on last edited by
                            #13

                            Glad to hear it is resolved.

                            Nokia Certified Qt Specialist
                            Interested in hearing about Qt related work

                            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