I'm new at Qt. I've created small application and I created second page
helpwindow = new help(this);
If your intention by "switching" is hiding one window and showing another one, so you can simply pass a reference of the main window to your help window and there when you want to switch back, you can hide/close itself and show the main window.
MainWindow (this code is fine)
helpwindow = new help(this); helpwindow->show();
When you want to switch back to the main window, you can do this:
// Hide the HelpWindow itself // or this->close() this->hide() // Show the MainWindow (i.e. the parent window) QWidget *parent = parentWidget(); parent->show();