PDA

View Full Version : Custom property in designer



avgust
8th September 2010, 15:29
I create custom widget. And i want to create custum property:
ex:
struct MyStruct
{
int t1;
double t2;
....
};
Q_PROPERTY(MyStruct propName READ .... WRITE ...)

This property i can't edit in property editor(desiner).
It's exist any way to do it? (For example in tree style).

PS. Sorry for my bad English. :)

e8johan
9th September 2010, 10:14
The easiest way to handle complex custom types is really to implement a menu entry "Edit data..." or something for your widgets in Designer. This is described here: http://doc.trolltech.com/4.6/designer-taskmenuextension.html .