Houdini 20.0 Python scripting hou hou.qt

hou.qt.FileChooserButton class

A button with the Houdini look and feel that opens the Houdini file chooser dialog when clicked.

On this page

This class inherits from Qt’s QtWidgets.QToolButton class.

Signals

fileSelected(str)

This signal is emitted when a selection is made in the file chooser dialog.

Methods

Examples

This example demonstrates creating a file chooser button and hooking it to a callback function that is invoked when a file is selected from the chooser dialog:

def onFileSelected(file_path):
    print("Selected file:", file_path)

file_chooser_btn = hou.qt.FileChooserButton()
file_chooser_btn.setFileChooserTitle("Please select a file")
file_chooser_btn.setFileChooserMode(hou.fileChooserMode.Read)
file_chooser_btn.fileSelected.connect(onFileSelected)

hou.qt