added simple tooltips for settings entities

This commit is contained in:
Jakub Trllo 2022-03-17 12:44:30 +01:00
parent 9044be5153
commit d14d9eecc8
3 changed files with 8 additions and 0 deletions

View file

@ -28,6 +28,10 @@ class BaseEntity:
def __init__(self, schema_data, *args, **kwargs):
self.schema_data = schema_data
tooltip = None
if schema_data:
tooltip = schema_data.get("tooltip")
self.tooltip = tooltip
# Entity id
self._id = uuid4()

View file

@ -14,6 +14,7 @@
- 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
- 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
- GUI schemas are huge json files, to be able to split whole configuration into multiple schema there's type `schema`

View file

@ -30,6 +30,9 @@ class BaseWidget(QtWidgets.QWidget):
if not self.entity.gui_type:
self.entity.on_change_callbacks.append(self._on_entity_change)
if self.entity.tooltip:
self.setToolTip(self.entity.tooltip)
self.label_widget = None
self.create_ui()