views:

368

answers:

2

I want a tab control to "dock" to the entire window panel, in Qt Creator. Now in Winforms and WPF this is super easy but in Qt its not working.

I've tried all the layouts, grid layouts, etc etc. it's just shrinking the tabs not making them grow to fill. So please test a solution before telling me what the SHOULD BE OBVIOUS answer is cause its not working.

omg QQ this is driving me NUTS

A: 

I have the same issues..

abhishek jindal
Instead of adding a completly pointless answer, perhaps it would be more productive for you to bookmark the question by upvoting it and by marking it as a favorite by clicking the star under the vote arrows...
Mihai Limbășan
+2  A: 

I'm unsure what you are trying to achieve here - do you want the control to fill the client area? Are you creating a QMainWindow-derived class or a QDialog-derived one? If using QMainWindow then you'd make the tab control the central widget by calling setCentralWidget. The tab control will then fill the main window's client area. I have done this many times.

Or do you want the tab 'ears' to stretch?

Rob
Good answer although it still took me a while to find it, for thos who come here next this can be done in the constructor of the mainwindow.cpp file ... this->setCentralWidget(ui->tabWidget);
crowne