PDA

View Full Version : QWdiget to QmainWindow



bollibompa
10th April 2011, 21:32
Hi,
I have finalized an app as a QWidget. I want to add a menu and wonder which is the easiest way to do this.
Can I convert QWidget to QMainWindow easy?
/Thomas

viulskiez
11th April 2011, 03:20
Can I convert QWidget to QMainWindow easy?
Sure, you can! Just change your widget parent class / superclass from QWidget to QMainWindow. Don't forget to change your constructor too.

bollibompa
11th April 2011, 10:08
Ok thanks!
But how do I change the constructor?
/Thomas

viulskiez
11th April 2011, 10:36
That is optional. If your constructor calling QWidget constructor, you have to change it.