Regarding the expose of properties from Qt to WinCC OA property editor

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
Pradeep Kumar
Posts:39
Joined: Fri Dec 09, 2016 2:54 pm

Regarding the expose of properties from Qt to WinCC OA property editor

Post by Pradeep Kumar »

I want to expose the properties from Qt to WinCC OA property editor, for standard and extended properties,

How can i do that , and do we need to implement the change in the class inherited by BaseExtendedWidget or in the class inherited by QWidget or QObject?

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

Re: Regarding the expose of properties from Qt to WinCC OA property editor

Post by mkoller »

You use the Qt property system, e.g.

Q_PROPERTY( QPen pen READ getPen WRITE setPen )

but to see the property in Gedi, you must not use DESIGNABLE false
as is done in the api example. Simply remove it (default is DESIGNABLE true)

Pradeep Kumar
Posts:39
Joined: Fri Dec 09, 2016 2:54 pm

Re: Regarding the expose of properties from Qt to WinCC OA property editor

Post by Pradeep Kumar »

Thanks for the reply, and i did DESIGNABLE as true and the properties are reflecting in the extended property section of Property editor.

Then how to provide the values the user changes in extended properties, after exposing the properties, the values has to change in ewo, how can i achieve it, can i get the sample program?
How to make the values changed in properties reflect it for ewo?

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

Re: Regarding the expose of properties from Qt to WinCC OA property editor

Post by mkoller »

A writable Qt property needs a READ and a WRITE method. Whenever the user changes a value either in Gedi or during runtime from a CTRL script, the WRITE method is used.
http://doc.qt.io/qt-5/properties.html

4 posts • Page 1 of 1