mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
added simple tooltips for settings entities
This commit is contained in:
parent
9044be5153
commit
d14d9eecc8
3 changed files with 8 additions and 0 deletions
|
|
@ -28,6 +28,10 @@ class BaseEntity:
|
||||||
|
|
||||||
def __init__(self, schema_data, *args, **kwargs):
|
def __init__(self, schema_data, *args, **kwargs):
|
||||||
self.schema_data = schema_data
|
self.schema_data = schema_data
|
||||||
|
tooltip = None
|
||||||
|
if schema_data:
|
||||||
|
tooltip = schema_data.get("tooltip")
|
||||||
|
self.tooltip = tooltip
|
||||||
|
|
||||||
# Entity id
|
# Entity id
|
||||||
self._id = uuid4()
|
self._id = uuid4()
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
- this keys is not allowed for all inputs as they may have not reason for that
|
- this keys is not allowed for all inputs as they may have not reason for that
|
||||||
- key is validated, can be only once in hierarchy but is not required
|
- key is validated, can be only once in hierarchy but is not required
|
||||||
- currently there are `system settings` and `project settings`
|
- currently there are `system settings` and `project settings`
|
||||||
|
- all entities can have set `"tooltip"` key with description which will be shown in UI
|
||||||
|
|
||||||
## Inner schema
|
## Inner schema
|
||||||
- GUI schemas are huge json files, to be able to split whole configuration into multiple schema there's type `schema`
|
- GUI schemas are huge json files, to be able to split whole configuration into multiple schema there's type `schema`
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,9 @@ class BaseWidget(QtWidgets.QWidget):
|
||||||
if not self.entity.gui_type:
|
if not self.entity.gui_type:
|
||||||
self.entity.on_change_callbacks.append(self._on_entity_change)
|
self.entity.on_change_callbacks.append(self._on_entity_change)
|
||||||
|
|
||||||
|
if self.entity.tooltip:
|
||||||
|
self.setToolTip(self.entity.tooltip)
|
||||||
|
|
||||||
self.label_widget = None
|
self.label_widget = None
|
||||||
self.create_ui()
|
self.create_ui()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue