mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
added ability to define word wrap of labels
This commit is contained in:
parent
2ce4704a98
commit
ab252ec7c9
2 changed files with 3 additions and 0 deletions
|
|
@ -745,6 +745,7 @@ How output of the schema could look like on save:
|
|||
### label
|
||||
- add label with note or explanations
|
||||
- it is possible to use html tags inside the label
|
||||
- set `work_wrap` to `true`/`false` if you want to enable word wrapping in UI (default: `false`)
|
||||
|
||||
```
|
||||
{
|
||||
|
|
|
|||
|
|
@ -567,7 +567,9 @@ class GUIWidget(BaseWidget):
|
|||
|
||||
def _create_label_ui(self):
|
||||
label = self.entity["label"]
|
||||
word_wrap = self.entity.schema_data.get("word_wrap", False)
|
||||
label_widget = QtWidgets.QLabel(label, self)
|
||||
label_widget.setWordWrap(word_wrap)
|
||||
label_widget.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction)
|
||||
label_widget.setObjectName("SettingsLabel")
|
||||
label_widget.linkActivated.connect(self._on_link_activate)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue