diff options
author | deva <deva> | 2008-07-22 06:55:09 +0000 |
---|---|---|
committer | deva <deva> | 2008-07-22 06:55:09 +0000 |
commit | 28d39474e6c0c14bd12716a9e20ad0469cd17cc6 (patch) | |
tree | 0d810f8e4a796ec04a1fc32ace902ee0ecc3afa7 | |
parent | 6d2e3e9af73c085580ab3b001063ddb3e74d2c3c (diff) |
Fixed initial value setting.
-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=""/> |