views:

25

answers:

1

Does anybody know if the Qt Toolkit provides a way to generate Ui Files from a given QWidget instance? Speaking in pseudo-code, I'm looking for something like this:

//setup widget
QWidget* pMyWidget=new QWidget(...);

//fill widget with life
pMyWidget->layout()->addWidget(new QLabel(...));
...

//finally write a Ui file:
pMyWidget->exportToUiFile(QString("/some/path/to/filename.ui"));

Alternatively: does somebody know a tool capable of doing this? Thx in advance, Axel

+2  A: 

Use QFormBuilder::save() from the QtDesigner module.

lunaryorn
Although the decoded .ui file looks a little bit strange, when evaluating it in the designer, that was exactly what I was looking for!
Axel
Thank you very much!!!
Axel