Getting widget names at runtime

  • hey
    i am working with tab widget and i need to make a component that can apply changes to all the the widgets placed inside a particular tabbed pane. thus i need to get the name or id of the widgets at run time . also from widgets inside the tab i need to apply changes to the tab container so i need the containers name and id too . what is the best possible solution . can you please help.

  • Hi,

    you can use the methods
    setObjectName and objectName for your purpose (see QObject class).

    There are already helper-methods findChild and findChildren which you can use for finding special child(ren).


Log in to reply

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