hi!
I am new to Qt and was very happy when i created my first own widgets. Now i am trying to create something bigger using the idea of having "mainwindows" with toolbars, menus, etc.

In Qwidgets I used the QGroupBox,QVBoxLayout,etc to arrange the design (buttons,sliders, Qwtplot areas,etc) of my widget layout. Now I tried to do the same with the mainwindow and it does not work. Reading the documentation I found out that in mainwindow class I cannot directly add Qwidgets, but I have to create a main widget and use the setCentralWidget(). I got a bit confused but just to get it right, the procedure should be like this?
  1. create mainwindow
  2. create main widget
  3. create several other smallerQwidgets
  4. use QGroupbox/QVBoxLayout to arrange smallerQwidgets in the main widget
  5. setCentralWidget(mainWidget)