summaryrefslogtreecommitdiff
path: root/editor/widget.cc
diff options
context:
space:
mode:
Diffstat (limited to 'editor/widget.cc')
-rw-r--r--editor/widget.cc10
1 files changed, 10 insertions, 0 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 *)