title: Switching app "states" using QMainWindow as superclass
body: <p>I'm attempting to run different modes/states of my app, for example having a menu which can go to a game state then highscore and from those two back to menu.</p>
  
  <p>A solution I tried was using the autogenerated class <code>QMainWindow</code> as a superclass for creating the classes <code>Menu</code> and <code>Game</code> to start with. In <code>QMainWindow</code> I later want to create a <code>QMainWindow</code>, fill it with a <code>Menu</code> or <code>Game</code> and in eg. <code>QMainWindow.paintEvents()</code> call <code>Menu.paintEvent()</code> through polymophfism.</p>
  
  <p>Now I know that I can't create a <code>QMainWindow</code> in another <code>QMainWindow</code> but would this idea work with yet another subclass called <code>states</code> or somthing inbetween the existing super/subclass(es)?</p>
  
  <p>I was able to run just <code>Game</code> by itself (instead of <code>QMainWindow</code>) so the inheritance is probably done right. But when trying to create and run only a <code>Game</code> in <code>QMainWindow</code> it gave me a <code>sigsegv</code> at <code>QMainWindow</code>'s constructor (which I have not changed and runs completely fine bby itself if empty). I've solved the problem with the classes including themselves in one another so that's not the problem either.</p>