common_widgets
common_widgets
¶
Classes¶
ClickableHeaderWidget
¶
Bases: QWidget
Widget emitting clicked when pressed with the left mouse button.
Attributes:
| Name | Type | Description |
|---|---|---|
clicked |
emitted on left button press |
Attributes¶
clicked = QtCore.Signal()
class-attribute
instance-attribute
¶
Functions¶
mousePressEvent(mouse_event)
¶
Emit clicked on left button press.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mouse_event
|
QMouseEvent
|
event. |
required |
Source code in src/nyx/editor/widgets/common_widgets.py
56 57 58 59 60 61 62 63 64 | |
ElidedTextLabel(parent=None)
¶
Bases: QLabel
QLabel that elides with '...' rather than forcing the window wider.
Initialize ElidedTextLabel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
parent
|
QWidget | None
|
parent widget. |
None
|
Source code in src/nyx/editor/widgets/common_widgets.py
7 8 9 10 11 12 13 14 15 16 17 | |
Functions¶
resizeEvent(resize_event)
¶
Re-elide the text for the new width.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resize_event
|
QResizeEvent
|
event. |
required |
Source code in src/nyx/editor/widgets/common_widgets.py
29 30 31 32 33 34 35 36 | |
set_full_text(full_text)
¶
Set the text, elided to fit the width. The full text is the tooltip.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
full_text
|
str
|
text to show. |
required |
Source code in src/nyx/editor/widgets/common_widgets.py
19 20 21 22 23 24 25 26 27 | |