Probably thanks to that "show()" in your main() which I guess is there.
Inheritance has nothing to do with it. With inheritance I was referring to your idea of modifying auto-generated code.You talk about inheritance and from what I've read before about how QT works, am I to assume that the show command (the only one I found in all of the code) used for the main window somehow affects all its children individually?![]()
And yes, exactly as the docs say, making a widget visible makes all its children visible unless they were explicitely hidden.
You do but not because of the reason you mentioned.If so I really need to sit down and read through the docs.
But still you make firm statements about what is and what is not.Well, I mistakingly assumed I wouldn't need to re-learn much, which is my fault but then again I am posting in the newbie section of the forum so I am quite aware of that.
Then take a text editor, open the file generated from your ui file (which is called ui_nameofthefile.h) and check its contents. Happy "enlightening".I am not quite sure what you're talking about but what I do does work (which I assume it should?)
Sure it does. "ui->nameofwidgetinquestion" is a widget while "ui" is not.in the constructor of the main window works perfectly fine.Qt Code:
ui->nameofwdigetinquestion->setVisible(0);To copy to clipboard, switch view to plain text mode
Yes, there is. Simply call "show()".I just thought there must be a much better way to do this (like through adding custom settings, setVisible and so on, in the form editor).
You are wrong but not very far from the truth. You can either follow the is-a concept (by inheriting the ui component) or the has-a concept (by making it a member of your widget subclass). You don't touch the constructor of the ui component but you implement the constructor of your subclass of the widget class. Just as written in the docs.Anyway, skimming through that link and some other examples, as I understand it, if I want to custom-make a certain widget, I include the ui-file, re-declare a constructor with the same name, and customize it the way I want. Am I getting the hang of it or am I just far out there?
That's because this is the Ultimate Qt Community site, not just some forumAgain, thanks for taking the time, you're like the only person in three different qt-forums who has even bothered to try answer that question for me...![]()
Bookmarks