PDA

View Full Version : reuse QtDesigner?



nicolas1
18th March 2009, 04:56
Hello,

Is there any way to reuse QtDesigner functionality for edit QObject derived objects propeties and QObject derived object trees in custom program? It can be very useful in practice to avoid coding in case of custom object tree managment.

For example, use ObjectInspector widget and PropertyEditor widget in custom program?

lyuts
20th March 2009, 12:42
Take a look at QtCreator and how it uses its designer plugin. I think you can do the same in your program.

nicolas1
20th March 2009, 13:10
Could you point me to the way how make auto-generate GUI and add,edit,remove operation code for data objects?

It is very boring (in case of many data-classes) to make dialog per class manually with edit box per object data field and listbox (models) per array of contained objects.

C++

lyuts
21st March 2009, 10:00
I have never used it myself before. So it will take me some time to investigate it.

fullmetalcoder
21st March 2009, 10:07
You can find one (or maybe more) PropertyEditor on QtApps.org
(http://qt-apps.org)
As for the object inspector it is simply a tree view showing object trees (http://doc.trolltech.com/4.4/objecttrees.html) maintained by the meta object system. (http://doc.trolltech.com/4.4/object.html)

These components are available in Qt Designer sources, but are fully independent from the QtDesigner application and can probably be made independent from the rest of Qt Designer core lib easily enough if you take some time to study the code.

nicolas1
22nd March 2009, 14:00
Yes, for this part there is no problem.

Problem arise when I want to serialialize/deserialize data with pointers (for example, to child objects). QDataStream does not handle pointers... ((
In QtDesigner, trolltech uses special c++ code generator (for example, ui4.cpp/ui4.h), which generates ser/deser code for QWidget -derived classes to xml Dom. Is there any same kind of tool?

How to make serialialize/deserialize of QObject derives?