[PyQt] How to get index of splitter
russ at coldstonelabs.org
Tue Jun 15 17:12:57 BST 2010
The index is the index for the widgets in the splitter. I usually only
have two widgets in a splitter so I would use index 0 or 1. If it is
horizontal splitter then 0 is the left and 1 is the right.
I like splitter.sizes() better than getRange personally.
On 06/15/10 10:01, F.A.Pinkse wrote:
> I want to change the position of a splitter handle programmaticly.
> I use the spltter.setSizes(). that change the posotion alright, but can
> figure out the logic when using different value's.
> When I do a splitter.getRange(<index>) I get the begin and end positions
> of the splitter.
> From these I can easily generate the proper value's for splitter.setSizes.
> The.getRange() needs an index as argument but how do I get the index of
> the splitter.
> Working wit PyQt4 on Python3
> With best regards,
More information about the PyQt