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. Using QCA with Qt5 -- How?
Forum Updated to NodeBB v4.3 + New Features

Using QCA with Qt5 -- How?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 4 Posters 1.4k 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.
  • R Offline
    R Offline
    rjmx
    wrote on last edited by
    #1

    I'm trying to upgrade one of my applications from GTK+ 2 to Qt5 (because GTK 3 doesn't bear thinking about). One of the last major hurdles involves PGP/GPG encryption.

    I'm running Debian testing, and libqca2 comes with it, so I don't need to build the library from scratch. What I do need to know, however, are these:

    • The documentation says to use "#include <QtCrypto>", which makes sense, except that it doesn't work. I get "QtCrypto: No such file or directory". How do I get past this?
    • What do I put in the .pro file in the "QT +=" line? I've tried "crypto", "qtcrypto", "qca", "qca2" and others, but nothing works. I can't find anything in the documentation that covers this.
    • Are there any other tricks I should know?

    Thanks,

    .....Ron

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by ChrisW67
      #2

      Are you using the system Qt5 bundle?

      Do you have these installed particularly the -dev package (from here)

      bookworm (libs): 2.3.4-1
      Binary packages: libqca-qt5-2, libqca-qt5-2-dev, libqca-qt5-2-plugins, libqca2-doc, qca-qt5-2-utils 
      
      R 1 Reply Last reply
      1
      • C ChrisW67

        Are you using the system Qt5 bundle?

        Do you have these installed particularly the -dev package (from here)

        bookworm (libs): 2.3.4-1
        Binary packages: libqca-qt5-2, libqca-qt5-2-dev, libqca-qt5-2-plugins, libqca2-doc, qca-qt5-2-utils 
        
        R Offline
        R Offline
        rjmx
        wrote on last edited by
        #3

        @ChrisW67 Yes, thanks, I have all of those. The -doc package seems to be a bit bare-bones, but I think I can sort it out. I just need to know what to #include and how to compile stuff.

        jsulmJ 1 Reply Last reply
        0
        • R rjmx

          @ChrisW67 Yes, thanks, I have all of those. The -doc package seems to be a bit bare-bones, but I think I can sort it out. I just need to know what to #include and how to compile stuff.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @rjmx You should check where the QCA header files are installed. Maybe you will need to set INCLUDEPATH in your pro file or include the header files using some subfolders like:

          #include <somefolder/QtCrypto>
          

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • R Offline
            R Offline
            rjmx
            wrote on last edited by
            #5

            Thanks. I was hoping to avoid that, but it seems necessary. With autoconf, you can use pkg-config to get past that, but Qt doesn't seem to have that facility.
            It was complicated by the fact that the locate system in my Debian box can't locate QtCrypto, even though I know it's there.
            Anyway, it turns out that I need

            #include <Qca-qt5/QtCrypto/QtCrypto>

            Ugly, but it works.

            Now the only thing I need is what to put in the .pro file in the QT+= line. Any ideas?

            Christian EhrlicherC 1 Reply Last reply
            0
            • R rjmx

              Thanks. I was hoping to avoid that, but it seems necessary. With autoconf, you can use pkg-config to get past that, but Qt doesn't seem to have that facility.
              It was complicated by the fact that the locate system in my Debian box can't locate QtCrypto, even though I know it's there.
              Anyway, it turns out that I need

              #include <Qca-qt5/QtCrypto/QtCrypto>

              Ugly, but it works.

              Now the only thing I need is what to put in the .pro file in the QT+= line. Any ideas?

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @rjmx said in Using QCA with Qt5 -- How?:

              but Qt doesn't seem to have that facility.

              Since Qt is a c++ library I would be surprised if there is a pkg-config c++ whatever.
              You most likely mean the build system. For cmake see FindPkgConfig.cmake for qmake e.g. here: https://forum.qt.io/post/699604

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              1
              • R Offline
                R Offline
                rjmx
                wrote on last edited by
                #7

                Thanks! I didn't know about that one. This is my first Qt project (and my first c++ project in a long time).

                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