Reputation: 51
I need to update the QSplitterHandle
position when QSplitter
child widget is resized due to other reason, than moving splitter handle. Particularly, I have the composite widget inside the splitter, and one of it's children is hidden.
I've tried the following things:
QSizePolicy
to widget.QSizePolicy
to the other widgets in QSplitter
QSplitter
Upvotes: 1
Views: 1713
Reputation: 51
I've asked the same question at QT support center, and here is the answer: Unfortunately there is no automated update function for handle position. The setSizes() function is a good option to update the sizes, but I can see the problem with recalculating the sizes every time. Another way is to implement your own splitter and call its protected function moveSplitter(). You still need to calculate the position where the splitter handle needs to be moved to, but you don't have to recalculate all widget sizes.
Upvotes: 1