Built-in Parameter Types

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

Used for displaying a button within the tree.

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. By default, it emits sigAddNew(self, typ).

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.

addClicked()[source]

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

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

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

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

Editable string; displayed as large text box in the 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.

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)

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.