PDA

View Full Version : Source code to *.ui



Zergi
28th September 2011, 14:46
Hi

Is there any possibility to convert source code(generated from qt designer) to *.ui file? I m asking because I overwrote my ui file and i didn't find any backups... But I found ui_file.h which contains generated from qt designer source code. I want to continue my project so is there any possibility to convert this file back to *.ui or I have to rebuild my ui form again?

Best regards

high_flyer
28th September 2011, 16:09
Is there any possibility to convert source code(generated from qt designer) to *.ui file?
No, since designer does not generate source code, but ui files! :)


But I found ui_file.h which contains generated from qt designer source code.
the ui_file.h IS the source code generate from the ui file!

so is there any possibility to convert this file back to *.ui
No.

stampede
28th September 2011, 17:54
.ui file is basically xml, so I guess you can write a generator for that. Anyway, it should be faster to design the ui again, based on the widget in your app (you can still use this ui_file.h to display ui in the app).

squidge
28th September 2011, 18:12
You don't need the .ui to make changes to your app anyway, you can just make them in code.

It would be possible to write a flakey script to translate the generated code back to .ui, but it would be easier and quicker to just redesign the ui.

And next time MAKE BACKUPS!

I have a backup of every change I've made to all of my projects, so I can always revert overwritten files, deleted files and any other changes. Lookup 'version control' then install something like Subversion or GIT.