I've created a form in Qt Creator 4 and 'compile' it to python module with pyuic4. Everything is ok but when I call the class represented my for it contains over 20 form elements as a public members (including Spacers etc.). But I need only 5 of them. It's not fatal but annoying... Is there a way to declare an element in Qt Creator as private/hidden? I mean it has to be done in Qt Creator because if I'll make any changes and recompile .ui file all changes in .py file would be overwritten.
The pyuic tool uses the objectName to generate the names of the top-level class and its members. So to make a member "private", just prepend some underscores to the objectName property in the designer component.
Qt Creator: how to hide members?