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. Cmake Qt package not found
QtWS25 Last Chance

Cmake Qt package not found

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qtcreator12qt6.6opcuaopc client
5 Posts 2 Posters 711 Views
  • 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
    kyakovlev
    wrote on 6 Feb 2024, 09:58 last edited by
    #1

    Goodday everyone!

    I'm very new to Qt and I bumped into a following problem:
    I have a Programm Logic Control that uses OPC UA protocol for data transfer. Now I must write a programm (client) to get data from the PLC (server) but when I try to use QOpcUaClient Class (https://doc.qt.io/qt-6/qopcuaprovider.html) Qt Creator shows this error: Qt6OpcUaConfig.cmake does not exist. What should I do in order for this library to appear and work?

    I istalled Qt with Qt Creator with all default settings that were alreasy choosen.

    screenshot2.PNG screenshot1.PNG

    S 1 Reply Last reply 6 Feb 2024, 11:12
    0
    • K kyakovlev
      6 Feb 2024, 09:58

      Goodday everyone!

      I'm very new to Qt and I bumped into a following problem:
      I have a Programm Logic Control that uses OPC UA protocol for data transfer. Now I must write a programm (client) to get data from the PLC (server) but when I try to use QOpcUaClient Class (https://doc.qt.io/qt-6/qopcuaprovider.html) Qt Creator shows this error: Qt6OpcUaConfig.cmake does not exist. What should I do in order for this library to appear and work?

      I istalled Qt with Qt Creator with all default settings that were alreasy choosen.

      screenshot2.PNG screenshot1.PNG

      S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 6 Feb 2024, 11:12 last edited by
      #2

      Please rather paste code than screenshots. It is much easier to see and copy-paste when replying.

      OPC UA module is an additional module. Please launch "Qt Maintenance" application, then "Add remove components", then select your Qt version and inside of it click on "Additional libraries". Lastly, check "Qt OPC UA". Proceed in the wizard, rebuild your project (run cmake, build) and it should work.

      6d15380f-3f93-4ff2-9151-b49ad075f730-Screenshot_20240206_121139.png file:///home/sierdzio/Pictures/Screenshot_20240206_121139.png

      (Z(:^

      K 1 Reply Last reply 6 Feb 2024, 11:38
      1
      • S sierdzio
        6 Feb 2024, 11:12

        Please rather paste code than screenshots. It is much easier to see and copy-paste when replying.

        OPC UA module is an additional module. Please launch "Qt Maintenance" application, then "Add remove components", then select your Qt version and inside of it click on "Additional libraries". Lastly, check "Qt OPC UA". Proceed in the wizard, rebuild your project (run cmake, build) and it should work.

        6d15380f-3f93-4ff2-9151-b49ad075f730-Screenshot_20240206_121139.png file:///home/sierdzio/Pictures/Screenshot_20240206_121139.png

        K Offline
        K Offline
        kyakovlev
        wrote on 6 Feb 2024, 11:38 last edited by kyakovlev 2 Jun 2024, 11:41
        #3

        @sierdzio
        Please rather paste code than screenshots. It is much easier to see and copy-paste when replying.
        Okay, I'll keep that in mind.

        Unfortunately, I don't have it in this list

        screenshot3.jpg

        I installed Qt from here, as an open source version software for Windows 10: https://www.qt.io/download-open-source

        S 1 Reply Last reply 7 Feb 2024, 06:06
        0
        • K kyakovlev
          6 Feb 2024, 11:38

          @sierdzio
          Please rather paste code than screenshots. It is much easier to see and copy-paste when replying.
          Okay, I'll keep that in mind.

          Unfortunately, I don't have it in this list

          screenshot3.jpg

          I installed Qt from here, as an open source version software for Windows 10: https://www.qt.io/download-open-source

          S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 7 Feb 2024, 06:06 last edited by
          #4

          @kyakovlev hm that is odd, this module is not exclusive to commercial licensees, so it should show up also in open source installer:

          The Qt OPC UA module is available under commercial licenses from The Qt Company. In addition, it is available under free software licenses. These free software licenses are GNU Lesser General Public License, version 3, or the GNU General Public License, version 2.

          I don't know what's the issue, sorry! Try asking on Qt Interest mailing list perhaps.

          (Z(:^

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kyakovlev
            wrote on 13 Mar 2024, 10:19 last edited by
            #5

            Okay, I managed to figure it out. Yes, this module is not available if using open source version of Qt but one can build it manually from source components and use.

            This instruction helped me a lot: https://linzichun.com/posts/qt-mqtt-opcua-modbus-rest/#qt-opc-ua

            Be ready to read the console, download some other missing stuff to your platform and repeat the same command, however. I needed to install about 4-5 missing utilities during the proccess.

            1 Reply Last reply
            0
            • K kyakovlev has marked this topic as solved on 13 Mar 2024, 10:20

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved