I was wondering how you can get an application to fill out the main window area when resizing/maximizing? I currently have a tab that contains a QTreeView and a QDialog object. These objects are arranged by a horizontal splitter which I call main splitter. What I would like to know is how to get the QTreeView and QDialog to fill in the extra space when the user maximizes the screen or resizes it to a larger size. I have tried the mainSplitter->addStretchFactor(0, 1) for QTreeView and mainSplitter->addStretchFactor(1,1) for QDialog but that doesn't seem to work .

Thanks for any help!