examples
Examples on how to use the fxgui
module.
configure_window
configure_window(window: FXMainWindow)
Configure the main window.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
FXMainWindow
|
The main window instance. |
required |
Source code in fxgui\examples.py
finish_splash_screen
finish_splash_screen(
splashscreen: FXSplashScreen, window: FXMainWindow, show_delayed: bool
) -> None
Finish the splash screen and show the main window.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
splashscreen |
FXSplashScreen
|
The splash screen instance. |
required |
window |
FXMainWindow
|
The main window instance. |
required |
show_delayed |
bool
|
Whether to show the window after a delay. |
required |
Source code in fxgui\examples.py
get_colors
Get the colors for the FXColorLabelDelegate
class.
Returns:
Type | Description |
---|---|
Dict[str, Tuple[QColor, QColor, QColor, QIcon, bool]]
|
A dictionary mapping item texts to `(background_color, |
Dict[str, Tuple[QColor, QColor, QColor, QIcon, bool]]
|
border_color, text_icon_color, icon, color_icon)`. |
Source code in fxgui\examples.py
main
Main example function.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
show_delayed |
bool
|
Whether to show the window after a delay. |
False
|
Source code in fxgui\examples.py
set_button_icons
set_button_icons(window: FXMainWindow) -> None
Set icons for the status buttons.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
FXMainWindow
|
The main window instance. |
required |
Source code in fxgui\examples.py
set_tooltips
set_tooltips(window: FXMainWindow) -> None
Set tooltips for the buttons.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
FXMainWindow
|
The main window instance. |
required |
Source code in fxgui\examples.py
setup_list_widget
setup_list_widget(window: FXMainWindow) -> None
Setup the list widget with a custom delegate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
FXMainWindow
|
The main window instance. |
required |
Source code in fxgui\examples.py
setup_refresh_action
setup_refresh_action(window: FXMainWindow) -> None
Setup the refresh action in the toolbar.
Source code in fxgui\examples.py
setup_status_buttons
setup_status_buttons(window: FXMainWindow)
Connect status buttons to display messages.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
FXMainWindow
|
The main window instance. |
required |
Source code in fxgui\examples.py
setup_table_widget
setup_table_widget(window: FXMainWindow) -> None
Setup the table widget with a custom delegate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
FXMainWindow
|
The main window instance. |
required |
Source code in fxgui\examples.py
setup_tree_widget
setup_tree_widget(window: FXMainWindow) -> None
Setup the tree widget with a custom delegate and a context menu.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
window |
FXMainWindow
|
The main window instance. |
required |
Source code in fxgui\examples.py
show_context_menu
Show the context menu when right-clicking on an item.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tree |
QTreeWidget
|
The tree widget to show the context menu in. |
required |
position |
QPoint
|
The position of the right-click. |
required |
Source code in fxgui\examples.py
show_floating_dialog_houdini
An example FXFloatingDialog launched from inside Houdini.
Source code in fxgui\examples.py
show_splash_screen
show_splash_screen() -> FXSplashScreen
Show the splash screen.
Returns:
Type | Description |
---|---|
FXSplashScreen
|
The splash screen instance. |
Source code in fxgui\examples.py
show_splashscreen
Show the splashscreen.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
time |
float
|
The time in seconds to show the splashscreen. |
5.0
|
Source code in fxgui\examples.py
show_window
Show the window.
Source code in fxgui\examples.py
show_window_houdini
An example FXMainWindow instance launched from inside Houdini.
simulate_loading
simulate_loading(
splashscreen: FXSplashScreen, application: FXApplication
) -> None
Simulate a loading process on the splash screen.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
splashscreen |
FXSplashScreen
|
The splash screen instance. |
required |
application |
FXApplication
|
The application instance. |
required |