PDA

View Full Version : QSplitter only resize from user input?



winston2020
30th January 2009, 02:00
I'd like to have a horizontal QSplitter with two widgets. When the window is resized, only the right-hand widget should expand. Meaning I want the handle for the QSplitter to remain a fixed horizontal distance from the left side of the window. But, the handle still needs to be draggable by the user, and it should just stay where its been left. Does anyone know how to achieve this?

caduel
30th January 2009, 16:50
Maybe QSplitter::setStretchFactor() will help you.
Apart from that: you could interecpt the QResizeEvent and adjust the splitter there to your liking. AFAICR there were posts (quite a while ago) to that question in either this forum, qtforum.org or the Qt mailing list.

HTH