summaryrefslogtreecommitdiff
path: root/client/widgets/label.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/label.cc')
-rw-r--r--client/widgets/label.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/client/widgets/label.cc b/client/widgets/label.cc
index b1875e4..dd658d3 100644
--- a/client/widgets/label.cc
+++ b/client/widgets/label.cc
@@ -27,17 +27,19 @@
#include "label.h"
#include <stdio.h>
-Label::Label(QDomNode node) : QLabel()
+Label::Label(QDomNode node)
+ : QLabel(), Widget(node)
{
QDomElement elem = node.toElement();
- if(elem.hasAttribute("name")) {
- widget_name = elem.attribute("name");
- } else {
- printf("XML ERROR!! Unnamed widget of type: %s\n",
- elem.tagName().toStdString().c_str());
+ if(elem.hasAttribute("width")) {
+ setMinimumWidth(elem.attribute("width").toInt());
}
+ if(elem.hasAttribute("height")) {
+ setMinimumWidth(elem.attribute("height").toInt());
+ }
+
if(elem.hasAttribute("caption")) {
setText(elem.attribute("caption"));
} else {