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

Create a file.ui with code c++



  • Hello I've work on an improvement of a graphic interface for 1 month and I've just realized that I modified the file "ui_monitorwindow.h" instead of "monitorwindow.ui". I would like to conserve my modifications and add them in "monitorwindow.ui" because the other file is automatically delete at each "make clean". Is it possible to make it automatically ?

    Thank for your help !

    Will


  • Lifetime Qt Champion

    Hi and welcome to the forums.
    If you mean to read the c++ and generate a UI file from it ?
    As far as I know, its not possible.
    However, if you add code to setup some of the widgets, you can move that code to the
    constructor after setupUI and it will work the same.
    However, if you add new widgets from code, that can still work in constructor, however
    the visual UI will not show those in design mode.



  • Ok thank for your answer ! I close this topic.


Log in to reply