diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/widget.cc | 10 | ||||
-rw-r--r-- | editor/widgets.xml | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/editor/widget.cc b/editor/widget.cc index 79957bd..9141939 100644 --- a/editor/widget.cc +++ b/editor/widget.cc @@ -84,6 +84,16 @@ Widget::Widget(QDomNode node) setLayout(new QHBoxLayout()); } setSizePolicy(widget->sizePolicy()); + if(widget->minimumSizeHint().isValid()) setMinimumSize(widget->minimumSizeHint()); + + // Iterate and call setValue on all attributes + QDomNamedNodeMap map = elem.attributes(); + for(size_t i = 0; i < map.length(); i++) { + QDomAttr attr = map.item(i).toAttr(); + QString name = attr.name(); + QString value = attr.value(); + setValue(name, value); + } } void Widget::paintEvent(QPaintEvent *) diff --git a/editor/widgets.xml b/editor/widgets.xml index e10003e..ccdb379 100644 --- a/editor/widgets.xml +++ b/editor/widgets.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <widgets> <widget name="label" caption="" border="false"/> - <widget name="checkbox" value="false" caption=""/> + <widget name="checkbox" value="true" caption=""/> <widget name="button" caption="ok"/> <widget name="lineedit" value=""/> <widget name="textedit" value=""/> |