I am searching to find a way to output an xml representation of all of the widgets on the current screen. I have pondered two options so far:
1. Manually build a QDomEntity as I build the screens and then write this to an outfile using save.
This seems tedious and I was hoping to make this "dump" function less intrusive to the code.
2. Use something like KDE's UI Recovery Toolkit which takes code and recreates .ui (XML) files.
I would prefer not to use a third party solution and only want the XML for the current visible screen and not the entire application.
Does anyone have a better idea or solution to doing this?
You could use the QApplication::allWidgets() to obtain a list, but you would have to parse that list for each widget and obtain the properties and whatever else interests you and push them to an xml format.
I pursued this route but realized that I need to know about the widgets from QDialogs rather than QApplications. Not all of our QDialogs are associated with QApplications. Any ideas for a similar function to QApplication::allWidgets for QDialogs?