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?
Regarding the expose of properties from Qt to WinCC OA property editor
- Pradeep Kumar
- Posts:39
- Joined: Fri Dec 09, 2016 2:54 pm
Regarding the expose of properties from Qt to WinCC OA property editor
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: Regarding the expose of properties from Qt to WinCC OA property editor
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)
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
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?
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
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
http://doc.qt.io/qt-5/properties.html