Built-in Parameter Types

class pyqtgraph.parametertree.parameterTypes.ActionParameter(**opts)[source]

Used for displaying a button within the tree.

itemClass

alias of ActionParameterItem

class pyqtgraph.parametertree.parameterTypes.ActionParameterItem(param, depth)[source]
treeWidgetChanged()[source]

Called when this item is added or removed from a tree. Expansion, visibility, and column widgets must all be configured AFTER the item is added to a tree, not during __init__.

class pyqtgraph.parametertree.parameterTypes.EventProxy(qobj, callback)[source]
eventFilter(self, QObject, QEvent) → bool[source]
class pyqtgraph.parametertree.parameterTypes.GroupParameter(**opts)[source]

Group parameters are used mainly as a generic parent item that holds (and groups!) a set of child parameters.

It also provides a simple mechanism for displaying a button or combo that can be used to add new parameters to the group. To enable this, the group must be initialized with the ‘addText’ option (the text will be displayed on a button which, when clicked, will cause addNew() to be called). If the ‘addList’ option is specified as well, then a dropdown-list of addable items will be displayed instead of a button.

addNew(typ=None)[source]

This method is called when the user has requested to add a new item to the group.

itemClass

alias of GroupParameterItem

setAddList(vals)[source]

Change the list of options available for the user to add to the group.

class pyqtgraph.parametertree.parameterTypes.GroupParameterItem(param, depth)[source]

Group parameters are used mainly as a generic parent item that holds (and groups!) a set of child parameters. It also provides a simple mechanism for displaying a button or combo that can be used to add new parameters to the group.

addChanged()[source]

Called when “add new” combo is changed The parameter MUST have an ‘addNew’ method defined.

addChild(self, QTreeWidgetItem)[source]
addClicked()[source]

Called when “add new” button is clicked The parameter MUST have an ‘addNew’ method defined.

optsChanged(param, changed)[source]

Called when any options are changed that are not name, value, default, or limits

treeWidgetChanged()[source]

Called when this item is added or removed from a tree. Expansion, visibility, and column widgets must all be configured AFTER the item is added to a tree, not during __init__.

class pyqtgraph.parametertree.parameterTypes.ListParameter(**opts)[source]
itemClass

alias of ListParameterItem

setLimits(limits)[source]

Set limits on the acceptable values for this parameter. The format of limits depends on the type of the parameter and some parameters do not make use of limits at all.

class pyqtgraph.parametertree.parameterTypes.ListParameterItem(param, depth)[source]

WidgetParameterItem subclass providing comboBox that lets the user select from a list of options.

limitsChanged(param, limits)[source]

Called when the parameter’s limits have changed

makeWidget()[source]

Return a single widget that should be placed in the second tree column. The widget must be given three attributes:

sigChanged a signal that is emitted when the widget’s value is changed
value a function that returns the value
setValue a function that sets the value

This is a good function to override in subclasses.

class pyqtgraph.parametertree.parameterTypes.SimpleParameter(*args, **kargs)[source]
itemClass

alias of WidgetParameterItem

class pyqtgraph.parametertree.parameterTypes.TextParameter(**opts)[source]

Editable string; displayed as large text box in the tree.

itemClass

alias of TextParameterItem

class pyqtgraph.parametertree.parameterTypes.TextParameterItem(param, depth)[source]
makeWidget()[source]

Return a single widget that should be placed in the second tree column. The widget must be given three attributes:

sigChanged a signal that is emitted when the widget’s value is changed
value a function that returns the value
setValue a function that sets the value

This is a good function to override in subclasses.

treeWidgetChanged()[source]

Called when this item is added or removed from a tree.

class pyqtgraph.parametertree.parameterTypes.WidgetParameterItem(param, depth)[source]

ParameterTree item with:

  • label in second column for displaying value
  • simple widget for editing value (displayed instead of label when item is selected)
  • button that resets value to default
Registered Types:  
int Displays a SpinBox in integer mode.
float Displays a SpinBox.
bool Displays a QCheckBox
str Displays a QLineEdit
color Displays a ColorButton
colormap Displays a GradientWidget

This class can be subclassed by overriding makeWidget() to provide a custom widget.

defaultChanged(param, value)[source]

Called when the parameter’s default value has changed

isFocusable()[source]

Return True if this item should be included in the tab-focus order

limitsChanged(param, limits)[source]

Called when the parameter’s limits have changed

makeWidget()[source]

Return a single widget that should be placed in the second tree column. The widget must be given three attributes:

sigChanged a signal that is emitted when the widget’s value is changed
value a function that returns the value
setValue a function that sets the value

This is a good function to override in subclasses.

optsChanged(param, opts)[source]

Called when any options are changed that are not name, value, default, or limits

selected(sel)[source]

Called when this item has been selected (sel=True) OR deselected (sel=False)

setFocus()[source]

Give input focus to this item. Can be reimplemented to display editor widgets, etc.

treeWidgetChanged()[source]

Called when this item is added or removed from a tree.

updateDisplayLabel(value=None)[source]

Update the display label to reflect the value of the parameter.

widgetValueChanging(*args)[source]

Called when the widget’s value is changing, but not finalized. For example: editing text before pressing enter or changing focus.