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. Help writing an image format plugin

Help writing an image format plugin

Scheduled Pinned Locked Moved Unsolved General and Desktop
pluginqimageio
8 Posts 2 Posters 2.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.
  • K Offline
    K Offline
    kegon
    wrote on last edited by kegon
    #1

    Hi

    I want to write a plugin based on QImageIOPlugin.

    There doesn't seem to be a fully worked example or tutorial, I am trying to follow the old Qt Quarterly article at https://doc.qt.io/archives/qq/qq17-imageio.html the how to at https://doc.qt.io/qt-5/plugins-howto.html and the docs for https://doc.qt.io/qt-5/qimageioplugin.html

    QMake reports

    Project WARNING: CONFIG-=import_qpa_plugin is deprecated. Use QTPLUGIN.platforms=- instead.
    

    and when I run make the header for QImageIOPlugin is not found.

    I would probably like to build as a KDE plugin in the future so any tips about that would also be welcome.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Out of curiosity, why do you have CONFIG-=import_qpa_plugin in your .pro file ?

      One place you can get inspiration from is the qtimageformats module.

      Depending on the plugin you are writing you might even consider contributing it to the module.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kegon
        wrote on last edited by
        #3

        Out of curiosity, why do you have CONFIG-=import_qpa_plugin in your .pro file ?

        I don't. I am using a slightly modified version of the project file in QQ17 (see link in my original post). I guess it is generated by the line (?)

        CONFIG = qt plugin
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Which version of Qt are you using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kegon
            wrote on last edited by
            #5

            I'm currently using Qt 5.5 on Mac and Linux.

            Last night I put together a new project file based on the JP2 one in the imageformats module. Now I am getting tons of errors of the type "no type named 'u16string' in namespace 'std'" for qstring.h. I'm going to have to do a lot more digging to get this to work.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by SGaist
              #6

              Which version of OS X and Xcode ?

              Ensure that you are using the macx-clang mkspecs

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              K 1 Reply Last reply
              0
              • SGaistS SGaist

                Which version of OS X and Xcode ?

                Ensure that you are using the macx-clang mkspecs

                K Offline
                K Offline
                kegon
                wrote on last edited by
                #7

                @SGaist

                Which version of OS X and Xcode ?

                The latest.
                10.11.4 and 7.3.

                I wouldn't say I use xcode. I use "xcode command line tools".

                I'm currently using macx-g++ but I don't remember why - isn't g++ an alias to clang on Mac ? Using clang seems to have fixed the errors above though.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Yes it is but the g++ mkspec is tailored for when there was only g++ hence it's linking to libstdc++ and not libc++.

                  That mkspec is to be considered deprecated and not used anymore.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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