From 28d39474e6c0c14bd12716a9e20ad0469cd17cc6 Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 22 Jul 2008 06:55:09 +0000 Subject: Fixed initial value setting. --- editor/widget.cc | 10 ++++++++++ editor/widgets.xml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'editor') 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 @@ - + -- cgit v1.2.3