Axel
Axel

Reputation: 33

How to re-engineer an Ui-File from a given QWidget instance

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

Upvotes: 3

Views: 232

Answers (1)

user355252
user355252

Reputation:

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

Upvotes: 3

Related Questions