Skip to content

SplitterHandle

Qt Base Class: QSplitterHandle

Signature: QSplitterHandle(self, o: PySide6.QtCore.Qt.Orientation, parent: PySide6.QtWidgets.QSplitter) -> None

Base classes

Name Children Inherits
WidgetMixin
prettyqt.widgets.widget
QSplitterHandle
PySide6.QtWidgets
QSplitterHandle(self, o: PySide6.QtCore.Qt.Orientation, parent: PySide6.QtWidgets.QSplitter) -> None

⋔ Inheritance diagram

graph TD
  1473296342752["widgets.SplitterHandle"]
  1473293688240["widgets.WidgetMixin"]
  1473299815024["core.ObjectMixin"]
  140713234304496["builtins.object"]
  1473245548480["gui.PaintDeviceMixin"]
  1473290608608["QtWidgets.QSplitterHandle"]
  1473290849680["QtWidgets.QWidget"]
  1473288842240["QtCore.QObject"]
  1473291690208["Shiboken.Object"]
  1473300082368["QtGui.QPaintDevice"]
  1473293688240 --> 1473296342752
  1473299815024 --> 1473293688240
  140713234304496 --> 1473299815024
  1473245548480 --> 1473293688240
  140713234304496 --> 1473245548480
  1473290608608 --> 1473296342752
  1473290849680 --> 1473290608608
  1473288842240 --> 1473290849680
  1473291690208 --> 1473288842240
  140713234304496 --> 1473291690208
  1473300082368 --> 1473290849680
  1473291690208 --> 1473300082368

🛈 DocStrings

Bases: WidgetMixin, QSplitterHandle

Handle functionality for the splitter.

Source code in prettyqt\widgets\splitterhandle.py
class SplitterHandle(widgets.WidgetMixin, widgets.QSplitterHandle):
    """Handle functionality for the splitter."""

    double_clicked = core.Signal(object)

    def __init__(
        self,
        orientation: constants.OrientationStr | constants.Orientation,
        parent: widgets.QSplitter,
        **kwargs,
    ):
        ori = constants.ORIENTATION.get_enum_value(orientation)
        super().__init__(ori, parent, **kwargs)

    @classmethod
    def setup_example(cls):
        w = widgets.Splitter("horizontal")
        return cls("horizontal", w)

    def mouseDoubleClickEvent(self, ev):
        self.double_clicked.emit(self)

    def set_orientation(
        self, orientation: constants.OrientationStr | constants.Orientation
    ):
        """Set the orientation of the slider.

        Args:
            orientation: orientation for the slider
        """
        self.setOrientation(constants.ORIENTATION.get_enum_value(orientation))

    def get_orientation(self) -> constants.OrientationStr:
        """Return current orientation.

        Returns:
            orientation
        """
        return constants.ORIENTATION.inverse[self.orientation()]

get_orientation() -> constants.OrientationStr

Return current orientation.

Source code in prettyqt\widgets\splitterhandle.py
def get_orientation(self) -> constants.OrientationStr:
    """Return current orientation.

    Returns:
        orientation
    """
    return constants.ORIENTATION.inverse[self.orientation()]

set_orientation(orientation: constants.OrientationStr | constants.Orientation)

Set the orientation of the slider.

Parameters:

Name Type Description Default
orientation OrientationStr | Orientation

orientation for the slider

required
Source code in prettyqt\widgets\splitterhandle.py
def set_orientation(
    self, orientation: constants.OrientationStr | constants.Orientation
):
    """Set the orientation of the slider.

    Args:
        orientation: orientation for the slider
    """
    self.setOrientation(constants.ORIENTATION.get_enum_value(orientation))

⌗ Property table

Qt Property Type Doc
objectName QString
modal bool
windowModality Qt::WindowModality
enabled bool
geometry QRect
frameGeometry QRect
normalGeometry QRect
x int
y int
pos QPoint
frameSize QSize
size QSize
width int
height int
rect QRect
childrenRect QRect
childrenRegion QRegion
sizePolicy QSizePolicy
minimumSize QSize
maximumSize QSize
minimumWidth int
minimumHeight int
maximumWidth int
maximumHeight int
sizeIncrement QSize
baseSize QSize
palette QPalette
font QFont
cursor QCursor
mouseTracking bool
tabletTracking bool
isActiveWindow bool
focusPolicy Qt::FocusPolicy
focus bool
contextMenuPolicy Qt::ContextMenuPolicy
updatesEnabled bool
visible bool
minimized bool
maximized bool
fullScreen bool
sizeHint QSize
minimumSizeHint QSize
acceptDrops bool
windowTitle QString
windowIcon QIcon
windowIconText QString
windowOpacity double
windowModified bool
toolTip QString
toolTipDuration int
statusTip QString
whatsThis QString
accessibleName QString
accessibleDescription QString
layoutDirection Qt::LayoutDirection
autoFillBackground bool
styleSheet QString
locale QLocale
windowFilePath QString
inputMethodHints QFlags

🖼 Screenshot

prettyqt.widgets.splitterhandle.SplitterHandle.setup_example
@classmethod
def setup_example(cls):
    w = widgets.Splitter("horizontal")
    return cls("horizontal", w)

Image title