Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Is there a way to retrieve ui file from header file which is compiled by uic?



  • Hi!,

    Sorry for this question. We used a uic compiler to generate a header file from ui file. But then we left this for few months and we lost the ui file.

    Is there a way where we can retrieve the ui file by going through the header file generated by uic file.

    Or do we need to manually read entire header file and create ui by manually?

    Thanks for understanding :-)



  • @aravmadd

    No, AFAIK this is not possible. The uic process does not work in both directions. The uic can't create a XML (.ui) file from a C++ header.

    How can you "lose" a file? :)



  • @Pl45m4 . Actually it was not my file. I am using qt funcitonalities with some other frameworks.It was used previously and worked by other person. But then he graduated and then he left.But he didnt keep the ui file so we have now only uic file. And i planned to make few changes so everything is kind of quite messy.

    I am trying to read through header file and create ui. I dont know if this is the only way?



  • @aravmadd said in Is there a way to retrieve ui file from header file which is compiled by uic?:

    I am trying to read through header file and create ui. I dont know if this is the only way?

    Yes, it is. Hopefully if it's not too complicated your can reverse-engineer to reproduce a .ui which corresponds.



  • @JonB Thanks jon. will do that re-engineering. I opened this question to make sure that there is no tool like that which does this re-engineering things. So will close the question now. Thanks


Log in to reply