PDA

View Full Version : QtDesigner: set centralWidget of QMainWindow



Florianx
25th June 2010, 18:06
Hi,
I want to use QtDesigner to create a QMainWindow.
But I can't set the centralWidget correctly: I want to have a TabWidget as my centralWidget, but in QtDesigner, it is always a QWidget and I cannot edit it. Simply dragging a QTabWidget onto the QMainWindow adds it as a child of the centralWidget, but I want t to be the centralWidget.
What am I doing wrong?

regards,
Florian

tbscope
25th June 2010, 18:17
It doesn't matter. You use layouts.

But... if you really really insist in having it as the central widget:
Create a new widget, then in your main window constructor create a new object of your tab widget, then set it as the central widget.