QLabel
QLabel
is used for displaying text or an image. No user interaction
functionality is provided.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text |
str
|
The text to display. |
None
|
Methods
Examples
'Hello World!'
'Goodbye World!'
setText(text)
Sets the label's text to the given text.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
text |
str
|
The text to set. |
required |
text()
Returns the label's text.
Returns:
Type | Description |
---|---|
str
|
The label's text. |