PDA

View Full Version : QSplitterHandle



bunjee
22nd February 2008, 18:49
Hey there,

I'm using a QSplitter to divide two Lists.
The QSplitterHandle is 5 pixels width.

I'd like that handle to be invisible but keeping the control on my spllitted widgets at the same time: thus avoiding the 5 pixels width border.

Anyone ever did that ?

ntp
22nd February 2008, 22:22
Try setHandleWidth(1) on your QSplitter. Don't try setHandleWidth(0) because that won't work; it seems to require a width of at least 1. You can also set it through the designer if you created your splitter in there (same width rules apply).

-- ntp

wysota
24th February 2008, 13:57
If you don't need the handle then maybe you don't need the splitter at all. You can set sizes of widgets manually without the splitter.

mchara
25th February 2008, 07:25
And note, that splitter handle (even with width = 1) painting is depending on style, so it may looks weird on some style.
If you are using styles(i mean if user can change style used by application) or you are planning to, you should override your splitter & splitter handle and override paintEvent.

wysota
25th February 2008, 07:59
One can also provide an own splitter handle. It can probably be an empty QWidget.