def create_separator(self, parent, is_vertical=True): """ Returns an adapted separator line control. """ control = QFrame() control.setFrameShadow(QFrame.Sunken) if is_vertical: control.setFrameShape(QFrame.VLine) control.setMinimumWidth(5) else: control.setFrameShape(QFrame.HLine) control.setMinimumHeight(5) return control_adapter_for(control)
def add_separator ( self, parent ): """ Adds a separator to the layout. """ control = QFrame() control.setFrameShadow( QFrame.Sunken ) if self.is_vertical or (self.columns > 0): control.setFrameShape( QFrame.HLine ) control.setMinimumHeight( 5 ) else: control.setFrameShape( QFrame.VLine ) control.setMinimumWidth( 5 ) if self.columns > 0: self.layout.addWidget( control, self._row, 0, 1, self.columns ) self._row += 1 else: self.layout.addWidget( control )