On this page |
This class inherits from Qt’s QtWidgets.QToolButton
class.
Signals ¶
trackSelected(str)
This signal is emitted when a selection is made in the track chooser dialog.
Methods ¶
__init__()
Create and return a new TrackChooserButton object.
setInitialSelection(initial_track)
Set the initially selected track when the track chooser dialog is opened.
initial_track
must be a hou.Track object.
setNodeChooserFilter(node_filter)
Set the node type filter used by the track chooser dialog.
node_filter
must be a hou.nodeTypeFilter enumerated value.
setSelectMultiple(value)
Set if multiple tracks should be selectable with the chooser dialog.
Examples ¶
This example demonstrates creating a chooser button for tracks and hooking it to a callback function that is invoked when a track is selected from the chooser dialog:
def onNodeSelected(track_path): print("Selected track:", track_path) track_chooser_btn = hou.qt.TrackChooserButton() track_chooser_btn.setNodeChooserFilter(hou.nodeTypeFilter.Chop) track_chooser_btn.trackSelected.connect(onTrackSelected)