I have a QWidget which I want to remain hidden until the user presses a shortcut. The shortcut works fine, but I don't want the QWidget to show up when the application starts up. The QWidget is added in the MyMainWindow's constructor. In my main function an instance of my subclass QMainWindow is created and then mymainwindow.show(); is called. When this is called all the child widgets are shown.

Any way to do this other than waiting to create the widget til after mymainwindow.show() is called.