Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to set (add) custom properties to Qt widgets in QtCreator?

Tags:

xml

qt

qt-creator

I want to convert the input of dialogues into xml.

The dialogues should be created in QtCreator. On commit I want to go through the object tree, and create similar xml from only those widgets, which are marked by a custom property as containing xml-value.

The tag name could be either the object name or the value of such a custom xml meta property.

So, is it possible in QtCreator to set any custom property in standard widgets?

like image 278
Valentin H Avatar asked Oct 14 '25 14:10

Valentin H


1 Answers

You can add a custom property to any widget, if that's what you mean. The Property Editor in Qt Designer has a "+" button which allows you to add a property. It'll ask you for its name and type, and once it's created you can set its value.

like image 192
Hamish Moffatt Avatar answered Oct 17 '25 22:10

Hamish Moffatt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!