dialogs
_dialogs
¶
Floating popup dialog.
Classes:
| Name | Description |
|---|---|
FXFloatingDialog |
A floating dialog that appears at the cursor's position. |
Classes¶
FXFloatingDialog
¶
FXFloatingDialog(
parent: Optional[QWidget] = None,
icon: Optional[QPixmap] = None,
title: Optional[str] = None,
parent_package: Optional[int] = None,
popup: bool = False,
)
Bases: FXThemeAware, QDialog
flowchart TD
fxgui.fxwidgets._dialogs.FXFloatingDialog[FXFloatingDialog]
fxgui.fxstyle.FXThemeAware[FXThemeAware]
fxgui.fxstyle.FXThemeAware --> fxgui.fxwidgets._dialogs.FXFloatingDialog
click fxgui.fxwidgets._dialogs.FXFloatingDialog href "" "fxgui.fxwidgets._dialogs.FXFloatingDialog"
click fxgui.fxstyle.FXThemeAware href "" "fxgui.fxstyle.FXThemeAware"
A floating dialog that appears at the cursor's position. It closes when any mouse button except the right one is pressed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
QtWidget
|
Parent widget. Defaults to |
None
|
|
QPixmap
|
The QPixmap icon. |
None
|
|
str
|
The dialog title. |
None
|
Attributes:
| Name | Type | Description |
|---|---|---|
dialog_icon |
QIcon
|
The icon of the dialog. |
dialog_title |
str
|
The title of the dialog. |
drop_position |
QPoint
|
The drop position of the dialog. |
dialog_position |
Tuple[int, int]
|
The position of the dialog. |
parent_package |
int
|
Whether the dialog is standalone application, or belongs to a DCC parent. |
popup |
bool
|
Whether the dialog is a popup or not. |
Methods:
| Name | Description |
|---|---|
closeEvent |
Removes the parent of the dialog and closes it. |
mousePressEvent |
Closes the dialog when any mouse button except the right one is pressed. |
set_dialog_icon |
Sets the dialog's icon. |
set_dialog_title |
Sets the dialog's title. |
show_under_cursor |
Moves the dialog to the current cursor position and displays it. |
Functions¶
closeEvent
¶
closeEvent(event: QCloseEvent) -> None
Removes the parent of the dialog and closes it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
¶ |
QCloseEvent
|
The close event. |
required |
mousePressEvent
¶
mousePressEvent(event: QMouseEvent) -> None
Closes the dialog when any mouse button except the right one is pressed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event
¶ |
QMouseEvent
|
The mouse press event. |
required |
set_dialog_icon
¶
Sets the dialog's icon.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
icon
¶ |
QPixmap
|
The QPixmap icon. |
None
|