My original question needs to be changed and reworded -It is possible to hide the handle but it is not useful- How can I make the handle indistinguishable from widgets around it? In other words How to camouflage the handle?
What I have done so far:
I have painted the handle in white by sub-classing QSplitterHandle and QSplitter and re-implementing the QSplitterHandle::paintEvent like this:
{
painter.fillRect(event->rect(), Qt::white);
}
void SplitterHandle::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
painter.fillRect(event->rect(), Qt::white);
}
To copy to clipboard, switch view to plain text mode
It is not enough because two black lines are visible around the handle, these are borders of the widgets in the splitter.
I have tried to paint the borders of the a widget (a QTreeWidget) in white:
treeWidget.setStyleSheet("border-color: white;");
treeWidget.setStyleSheet("border-color: white;");
To copy to clipboard, switch view to plain text mode
But this has no effect.
Now the question is How to change the border-colors of a widget?
P.S.
To hide the handle it is possible to re-implementing its showEvent and call hide() 
Added after 1 55 minutes:
To hide the handle it is possible to re-implementing its showEvent and call hide()
It is possible to hide the handle but it is not useful
It can be useful! With some work it is possible to make the handle visible again, thus it is possible to alternate the state between visible and hidden.
Still I need to know How to change border-colors of a widget.
Bookmarks