I have following two classes with their UI forms.
MainWindow *mainW = new MainWindow;
If we assume that
MainWindow are both derived from
QMainWindow (otherwise it wouldn't just be a content switch), then one option other than using a
QStackedWidget would be to have the two form classes derive from
QWidget and use either as the
centralWidget of a single