Skip to content

Commit ccc51a3

Browse files
Search for ui:widget in schema before ui_schema
1 parent 16625af commit ccc51a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

qt_jsonschema_form/form.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ def create_widget(self, schema: dict, ui_schema: dict, state=None) -> widgets.Sc
8989
if "enum" in schema:
9090
default_variant = "enum"
9191

92-
widget_variant = ui_schema.get('ui:widget', default_variant)
92+
widget_variant = schema.get('ui:widget')
93+
if widget_variant is None:
94+
widget_variant = ui_schema.get('ui:widget', default_variant)
9395
widget_cls = self.widget_map[schema_type][widget_variant]
9496

9597
widget = widget_cls(schema, ui_schema, self)

0 commit comments

Comments
 (0)