Class: QgsScrollBarHighlightController

Adds highlights (colored markers) to a scrollbar.

Added in version 3.38.

class qgis.gui.QgsScrollBarHighlightController[source]

Bases: object

addHighlight(self, highlight: QgsScrollBarHighlight)[source]

Adds a highlight to the scrollbar.

Parameters:

highlight (QgsScrollBarHighlight)

lineHeight(self) float[source]

Returns the line height for text associated with the scroll area.

See also

setLineHeight()

Return type:

float

margin(self) float[source]

Returns the document margins for the associated viewport.

See also

setMargin()

Return type:

float

removeAllHighlights(self)[source]

Removes all highlights from the scroll bar.

removeHighlights(self, category: int)[source]

Removes all highlights with matching category from the scrollbar.

Parameters:

category (int)

scrollArea(self) QAbstractScrollArea | None[source]

Returns the associated scroll area.

See also

setScrollArea()

Return type:

Optional[QAbstractScrollArea]

scrollBar(self) QScrollBar | None[source]

Returns the associated scroll bar.

Return type:

Optional[QScrollBar]

setLineHeight(self, height: float)[source]

Sets the line height for text associated with the scroll area.

See also

lineHeight()

Parameters:

height (float)

setMargin(self, margin: float)[source]

Sets the document margin for the associated viewport.

See also

margin()

Parameters:

margin (float)

setScrollArea(self, scrollArea: QAbstractScrollArea | None)[source]

Sets the associated scroll bar.

See also

scrollArea()

Parameters:

scrollArea (Optional[QAbstractScrollArea])

setVisibleRange(self, visibleRange: float)[source]

Sets the visible range of the scroll area (i.e. the viewport’s height).

See also

visibleRange()

Parameters:

visibleRange (float)

visibleRange(self) float[source]

Returns the visible range of the scroll area (i.e. the viewport’s height).

Return type:

float