WidgetProperty

class glue.utils.qt.widget_properties.WidgetProperty(att, docstring='')[source]

Bases: object

Base class for widget properties

Subclasses implement, at a minimum, the “get” and “set” methods, which translate between widget states and python variables

Parameters
attstr

The location, within a class instance, of the widget to wrap around. If the widget is nested inside another variable, normal ‘.’ syntax can be used (e.g. ‘sub_window.button’)

docstringstr, optional

Optional short summary for the property. Used by sphinx. Should be 1 sentence or less.

Methods Summary

getter(self, widget)

Return the state of a widget.

setter(self, widget, value)

Set the state of a widget to a certain value

Methods Documentation

getter(self, widget)[source]

Return the state of a widget. Depends on type of widget, and must be overridden

setter(self, widget, value)[source]

Set the state of a widget to a certain value