Search code examples
pythonpyqtqsplitter

Remove QSplitter line between widgets


I am building a UI and I have a horizontal QSplitter with 2 widgets. I want to remove the line with the dots (.....) between the widgets.

Here is an image to make it clear what I want removed.

the dots I want gone
here is some code:
self.mySplitter = QSplitter(Qt.Horizontal, self) self.mySplitter.addWidget(self.widget1) self.mySplitter.addWidget(self.mySecondSplitter) self.mySplitter.setChildrenCollapsible(False)


Solution

  • I think you have applied a stylesheet somewhere in you code. To hide the image, try this:

    self.mySplitter.setStyleSheet("QSplitter::handle { image: none; }")
    

    Hope this helps!