PDA

View Full Version : Splitter snapping



qtoptus
30th October 2014, 18:50
Is it possible to make the splitter bar snap to another splitter while moving? For example in case of quad splitter I want to be able to move one horizontal bar and make it snap to the other horizontal bar in the other column when its close enough...

Thanks

wysota
31st October 2014, 06:59
It is possible to implement it. You can use setSizes() to manually distribute size between splitter sections.

qtoptus
16th November 2014, 18:09
I think there's misunderstanding in what I want to accomplish. If you have Rhinoceros installed try moving the splitters they snap to each other.

wysota
16th November 2014, 20:03
What if I don't? :) I think I understood you correctly.

qtoptus
17th November 2014, 05:49
I you don't you can download it from here: http://www.rhino3d.com/

See how the splitters work.

wysota
17th November 2014, 06:40
I don't think there is a Linux version for download. Anyway, I am guessing that I know what you mean and I still say that you can do it if you detect when the user stops dragging the splitter so that you can reposition it using QSplitter::setSizes() (or moveSplitter() if you subclass the splitter).