开发者

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

开发者 https://www.devze.com 2023-01-16 04:14 出处:网络
Does anybody know if the Qt Toolkit provides a way to generate Ui Files 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开发者_JAVA技巧 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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消