PyQt5: setObjectName to all Objects/Widgets [duplicate]
问题 This question already has answers here : Get a list of all QObjects created in a Application (1 answer) Find item in QApplication by only the objectname (3 answers) Closed last month . I build a GUI with 100+ widgets, layouts, frames, ... Each one of those I set a name manually with .setObjectName to make debugging easier. Instead of "LayoutObject has a problem" I get error messages such as "name_of_LayoutObject has a problem" which is very convenient. However it enlarges my code by ~20% and