title: Qt Designer: Changing the base class of a window
body: <p>I already created a second window for my application in the Qt Designer.
  I read that a QMainWindow would be the wrong class for the second window (which basically should only be some kind of dialog), so I would like to change the base class.</p>
  
  <p><strong>My Question(s) are:</strong></p>
  
  <ol>
  <li>Is there a way to change the base class without creating a new window and copying my code into the new files?</li>
  <li>Can somebody please explain when to use QMainWindow, QDialog and QWidget? I did not found good explanations for the differences between these three base classes in Qt.</li>
  </ol>