1

For example if I add QStatusBar to my window, I see too wide corner:

self.stat = QtGui.QStatusBar()       
widLayout = QtGui.QVBoxLayout()
widLayout.addWidget(some_pannel)
widLayout.addWidget(self.stat)
self.setLayout(widLayout)

enter image description here

Ivan Borshchov
  • 3,036
  • 5
  • 40
  • 62

1 Answers1

7

From the official documentation:

  • PySide.QtGui.QLayout.setContentsMargins() sets the width of the outer border on each side of the widget. This is the width of the reserved space along each of the PySide.QtGui.QBoxLayout ‘s four sides.
  • PySide.QtGui.QBoxLayout.setSpacing() sets the width between neighboring boxes. (You can use PySide.QtGui.QBoxLayout.addSpacing() to get more space at a particular spot.)

So, basically:

widLayout.setSpacing(0)
widLayout.setContentsMargins(0, 0, 0, 0)
bosnjak
  • 8,424
  • 2
  • 21
  • 47