summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authordeva <deva>2011-04-04 09:38:52 +0000
committerdeva <deva>2011-04-04 09:38:52 +0000
commitcf565c08aae0b5f4047cc6fe1c89d573a555c0a5 (patch)
tree021791a98a6ec5aa7eb45ee4195cc0b471ddf8fb /client
parentdeb8a5e8d56a8cd50a548632fe2e539a0c451bba (diff)
Fix wierd CheckGroupBox layout with type='framed'.
Diffstat (limited to 'client')
-rw-r--r--client/widgets/checkgroupbox.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/widgets/checkgroupbox.cc b/client/widgets/checkgroupbox.cc
index 2298105..a5692b2 100644
--- a/client/widgets/checkgroupbox.cc
+++ b/client/widgets/checkgroupbox.cc
@@ -49,17 +49,17 @@ CheckGroupBox::CheckGroupBox(QDomNode &node, MacroWindow *macrowindow)
groupbox = new QGroupBox();
groupbox->setCheckable(true);
connect(groupbox, SIGNAL(toggled(bool)), this, SLOT(state_change(bool)));
- if(elem.hasAttribute("caption")) {
- groupbox->setTitle(elem.attribute("caption"));
- }
widget = groupbox;
- setCommonAttributes(widget, node);
setCommonLayout(widget, node);
addChildren(node, widget->layout());
+ if(elem.hasAttribute("caption")) {
+ groupbox->setTitle(elem.attribute("caption"));
+ }
+
} else if(type == "simple") {
widget = new QWidget();
widget->setContentsMargins(0,0,0,0);
@@ -75,7 +75,6 @@ CheckGroupBox::CheckGroupBox(QDomNode &node, MacroWindow *macrowindow)
container = new QWidget();
l->addWidget(container);
- setCommonAttributes(widget, node);
setCommonLayout(container, node);
addChildren(node, container->layout());
@@ -86,6 +85,8 @@ CheckGroupBox::CheckGroupBox(QDomNode &node, MacroWindow *macrowindow)
ERROR(checkgroupbox, "Illegal value of attribute 'type'\n");
}
+ setCommonAttributes(widget, node);
+
//
// From CheckBox
//