Expose toolbutton to property editor of WinCC OA

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

Expose toolbutton to property editor of WinCC OA

Post by Pradeep Kumar »

I want to add toolbutton and combobox for property editor ,
through Qt we can expose using Q_PROPERTY,
but how to add to property editor of WinCC OA.

Image
Attachments
combobox.png

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

Re: Expose toolbutton to property editor of WinCC OA

Post by mkoller »

That's done automatically by Gedi. It reads all available Qt properties and shows them in the extended tab

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

Re: Expose toolbutton to property editor of WinCC OA

Post by Pradeep Kumar »

k i have got what u said , i need to provide properties ,
i am providing using Q_PROPERTY( QStringList listValues READ getListValue WRITE setListValue DESIGNABLE true)

where listValues consist of many items, how the gedi will come to know it should add toolbutton or combobox?

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

Re: Expose toolbutton to property editor of WinCC OA

Post by mkoller »

QStringList is not supported as being edited in the gedi attribute editor.
You can only edit attributes of simple types like bool, int, float, string and also any enum.
Also you can use QColor, QPen, QBrush, QFont, QPoint

What you can do instead is to provide your own parametrization panel for the ewo.
See our help: qthelp://wincc_oa/doc/Native_GEDI/EWO.htm
"How can I get a special editor for the settings of my EWO ?"

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

Re: Expose toolbutton to property editor of WinCC OA

Post by Pradeep Kumar »

k so we cant use Qt datatypes like QStrinlist etc kk.

Q_ENUMS(Qt::ToolButtonStyle Qt::ArrowType ToolButtonPopupMode)
Q_PROPERTY(ToolButtonPopupMode popupMode READ popupMode WRITE setPopupMode)
Q_PROPERTY(Qt::ToolButtonStyle toolButtonStyle READ toolButtonStyle WRITE setToolButtonStyle)

Do i need to provide the Q_PROPERTY as mentioned above?

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

Re: Expose toolbutton to property editor of WinCC OA

Post by Pradeep Kumar »

using QBrush and QColor , i am able to get tollbutton, using bool i am able to get combobox.

can anyone tell me after when i click on the toolbutton , i want the widget to pop up which we provided, by default the brush window is poping up, how to avoid and make in the setter function to pop up our widget.

ImageImage

This widget we need to show onclick on toolbutton in extended properties, not the previous image of fill type selection.

can u expain , how we can achieve this?

Image

I want the toolbutton widget, to appear when we click on tolbutton in extended properties, not the fill type selection widget.
Attachments
brushproperty.png
toolbuttonwidget.png

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

Re: Expose toolbutton to property editor of WinCC OA

Post by Pradeep Kumar »

Any solution on the above post? how can we achieve the widget ui which we developed to be popup after clicking on to the toolbutton

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Expose toolbutton to property editor of WinCC OA

Post by Gertjan van Schijndel »

I do not think it is possible to define an own widget for the selection of your EWO. However it is possible to create an object panel and place your EWO in it and use enums in the properties of this panel (these enums are shown in a dropdown list).

But you can use/make a special editor for your EWO as mentioned by Martin. In the online help this is under: Graphics editor (GEDI) -> Complex graphics objects -> EWO (External Widget Object) -> How can I get a special editor for the settings of my EWO?

8 posts • Page 1 of 1