change label of ParameterItem to something besides the name?

18 views
Skip to first unread message

Tim Williams

unread,
Aug 16, 2016, 12:51:22 PM8/16/16
to pyqtgraph
Hi,

I'm trying to create a ParameterTree, but I'd like to be able to change the labels of the widgets that are created.

I'm writing something with Gstreamer using PyGObject.  I can get the properties that has name, nick (nickname), blurb (tooltip), among other things. I want to reference my paramater with the 'name' attribute, but I'd like to have the widget created use the 'nick' attribute for the button's label.

The reason I want to do this is so I can do a elem.set_property(<name>), where  <name> is both the pygqgraph.parameter name, and the name attribute of the GObject.ParamSpec.  I'm using the 'tips' option to set my tooltip, which is exactly what I want for that. It would be nice to have something like a 'label' option when makeWidget() is called.

I've looked through the python code in parameterTypes.py and Parameter.py, but I don't see a way to do this.

I may try to use a dictionary to map my pyqtgraph.parameter.name to my GObject.ParamSpec.nick, and from that to my GObject.ParamSpec.name.

Thanks for any help.

Reply all
Reply to author
Forward
0 new messages