Where are the widget objects placed?



  • When widgets are created on Designer layout within Qt Creator, each widget has an object name.
    I created a simple example with some widgets ( it compiled ), I could find the corresponding name of the widget object in any of the header files show in Qt Creator.

    Can someone tell me where they are located?
    Please be specific.



  • they are located in the .ui file as xml during the build QMake i believe or some other tool will generate a header file from xml this file is normally in the form ui_<Name Of .ui File>.h



  • [quote author="SimonL" date="1308188576"]they are located in the .ui file as xml during the build QMake i believe or some other tool will generate a header file from xml this file is normally in the form ui_<Name Of .ui File>.h[/quote]

    Correct. This tool is uic.



  • Indeed. The widget object names end up in the header file that you include in the header file for the class implementation. It is, as SimonL mentioned, named ui_<Name Of .ui File>.h, but it only exists after building. It is educational to have a look at it once.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.