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. How to setup opcuaviewer example in QtCreator

How to setup opcuaviewer example in QtCreator

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 333 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.
  • J Offline
    J Offline
    James Mark Chan
    wrote on last edited by
    #1

    Hi I'm trying to set up the opcuaviewer example in QtCreator in ubuntu 18.04.4 w Qt5.12 but I seem to have come across two issues:

    1. is that after compiling the opcua module in my local directory I have these:
    jchan@jchan-Z170N:~/Qt5.12.6/5.12.6/gcc_64/lib$ ls -la *OpcUa*
    -rw-r--r-- 1 jchan jchan      742 Feb  5 17:44 libQt5OpcUa.la
    -rw-r--r-- 1 jchan jchan     1213 Feb  5 17:44 libQt5OpcUa.prl
    lrwxrwxrwx 1 jchan jchan       21 Feb  5 17:44 libQt5OpcUa.so -> libQt5OpcUa.so.5.12.6
    lrwxrwxrwx 1 jchan jchan       21 Feb  5 17:44 libQt5OpcUa.so.5 -> libQt5OpcUa.so.5.12.6
    lrwxrwxrwx 1 jchan jchan       21 Feb  5 17:44 libQt5OpcUa.so.5.12 -> libQt5OpcUa.so.5.12.6
    -rwxr-xr-x 1 jchan jchan  1028576 Feb  5 17:43 libQt5OpcUa.so.5.12.6
    -rw-r--r-- 1 jchan jchan 13759248 Feb  5 17:43 libQt5OpcUa.so.5.12.6.debug
    

    but in qtcreator it seems to not be able to find my opcua module:
    unknown-module-opcua.png

    1. the examples that i've copied and pasted from here:
      https://doc.qt.io/QtOPCUA/qtopcua-opcuaviewer-example.html
      don't seem to have a ui_certificatedialog.h
      which is referenced in certificatedialog.cpp. Could I be missing some of the example files if so where would I get them or is this something that I should be implementing my self?
    jsulmJ 1 Reply Last reply
    0
    • J James Mark Chan

      Hi I'm trying to set up the opcuaviewer example in QtCreator in ubuntu 18.04.4 w Qt5.12 but I seem to have come across two issues:

      1. is that after compiling the opcua module in my local directory I have these:
      jchan@jchan-Z170N:~/Qt5.12.6/5.12.6/gcc_64/lib$ ls -la *OpcUa*
      -rw-r--r-- 1 jchan jchan      742 Feb  5 17:44 libQt5OpcUa.la
      -rw-r--r-- 1 jchan jchan     1213 Feb  5 17:44 libQt5OpcUa.prl
      lrwxrwxrwx 1 jchan jchan       21 Feb  5 17:44 libQt5OpcUa.so -> libQt5OpcUa.so.5.12.6
      lrwxrwxrwx 1 jchan jchan       21 Feb  5 17:44 libQt5OpcUa.so.5 -> libQt5OpcUa.so.5.12.6
      lrwxrwxrwx 1 jchan jchan       21 Feb  5 17:44 libQt5OpcUa.so.5.12 -> libQt5OpcUa.so.5.12.6
      -rwxr-xr-x 1 jchan jchan  1028576 Feb  5 17:43 libQt5OpcUa.so.5.12.6
      -rw-r--r-- 1 jchan jchan 13759248 Feb  5 17:43 libQt5OpcUa.so.5.12.6.debug
      

      but in qtcreator it seems to not be able to find my opcua module:
      unknown-module-opcua.png

      1. the examples that i've copied and pasted from here:
        https://doc.qt.io/QtOPCUA/qtopcua-opcuaviewer-example.html
        don't seem to have a ui_certificatedialog.h
        which is referenced in certificatedialog.cpp. Could I be missing some of the example files if so where would I get them or is this something that I should be implementing my self?
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @James-Mark-Chan Your LIBS in pro file does not contain actual lib. It should be:

      LIBS += -LPATH_TO_LIB_DIR -lQt5OpcUa
      

      ui_certificatedialog.h will be generated when compiling.

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

      1 Reply Last reply
      2
      • J Offline
        J Offline
        James Mark Chan
        wrote on last edited by James Mark Chan
        #3

        Thank you for this post. I just discovered that I should have been using the examples from the qt clone instead of manually copying the text from the web url and it seems no LIBS += ... line was even needed as my creator was configured to use the default kit. It is launching now. I do wonder why my objects under the device folder node are not showing and will be looking into it.
        opcuaviewer-example-cs208.png

        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