Importing external widget objects

Discussion about recent product features & solutions!
7 posts • Page 1 of 1
zscriven
Posts:21
Joined: Tue Jul 05, 2016 11:03 pm

Importing external widget objects

Post by zscriven »

I have found a pie chart template I like in QT.

What steps do I take to import this as an external widget object in OA? https://www.winccoa.com/fileadmin/image ... _in_QT.png
Attachments
Chart_in_QT.png

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Importing external widget objects

Post by mkoller »

First step, in the API installation dir there is a README file.
Then use the script, e.g. /opt/WinCC_OA/3.14/api/newEWO.sh
to create an example EWO.
Have a look inside the created .cxx file, there are TODO comments which should give you a hint what you need to do.
You should be able to just use qmake and make to compile the example.
Note on Linux you need to have Qt self-compiled with a namespace since we need that to not conflict with the system delivered Qt libs
(e.g.: ./configure -qtnamespace WinCC_OA -qtlibinfix WinCC_OA -nomake examples -nomake demos -nomake docs)

zscriven
Posts:21
Joined: Tue Jul 05, 2016 11:03 pm

Re: Importing external widget objects

Post by zscriven »

If I didn't orignially install the api manager how can I do this after the fact? Will this cost additional licensing?

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Importing external widget objects

Post by mkoller »

You don't install an api manager, you just install the api development possibility, which not only includes the feature to create your own manager
but also to develop different types of plugins, e.g. an EWO or a Ctrl-Extension.
The license shield file does not account for plugins.
Note: I'm not from sales, so I have no idea what your license agreement covers.

zscriven
Posts:21
Joined: Tue Jul 05, 2016 11:03 pm

Re: Importing external widget objects

Post by zscriven »

Thanks! Where do I download that at?

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Importing external widget objects

Post by mkoller »

The api comes with our product. Qt comes from the Qt company: http://download.qt.io/archive/qt/5.5/5.5.0/

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Importing external widget objects

Post by mkoller »

I found out that it's not needed to compile your own Qt on Linux since the namespace can just be given in the .pro file and you link against the libs we already deliver.
For this, add the following in your .pro file:

unix: DEFINES += "QT_LIBINFIX=WinCC_OA" "QT_NAMESPACE=WinCC_OA" QT_NO_VERSION_TAGGING

7 posts • Page 1 of 1