#include "ModuleBase_WidgetLabel.h"
#include <Config_WidgetAPI.h>
+#include <ModuleBase_Tools.h>
#include <QLabel>
+#include <QVBoxLayout>
ModuleBase_WidgetLabel::ModuleBase_WidgetLabel(QWidget* theParent,
- const Config_WidgetAPI* theData,
- const std::string& theParentId)
+ const Config_WidgetAPI* theData,
+ const std::string& theParentId)
: ModuleBase_ModelWidget(theParent, theData, theParentId)
{
QString aText = QString::fromStdString(theData->getProperty("title"));
myLabel = new QLabel(aText, theParent);
myLabel->setWordWrap(true);
myLabel->setIndent(5);
+ myLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+ QVBoxLayout* aLayout = new QVBoxLayout(this);
+ ModuleBase_Tools::zeroMargins(aLayout);
+ aLayout->addWidget(myLabel);
+ setLayout(aLayout);
}
ModuleBase_WidgetLabel::~ModuleBase_WidgetLabel()
return QList<QWidget*>();
}
-QWidget* ModuleBase_WidgetLabel::getControl() const
-{
- return myLabel;
-}