PDA

View Full Version : Problem with layout -- need to prevent stretching of grid(s) separated by splitter



Kozersky
1st August 2015, 20:58
The problem is as follows -- I have one QCustomPlot from the left side and GridLayout from the right, they are separated by splitter. Undesired effect is that grid layout is getting stretched to the maximum. I would like to prevent that. Need to have QCustomPlot stretched instead. I think I have tried everything (e.g. horizontal size policy Minimum for the grid, Maximum for the plot), also been reading similar posts here, but no solution. Would be grateful if someone can help or give an advice.

ChrisW67
1st August 2015, 21:22
Splitter->setStretchFactor(0, 1);
Splitter->setStretchFactor(1, 0);

Should make the left column gain all new space that becomes available.

Kozersky
2nd August 2015, 10:34
You saved my day. Thank you a lot!