Salome HOME
Merge branch 'Dev_1.2.0' of newgeom:newgeom into Dev_1.2.0
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetLineEdit.cpp
index 9c4a1b00f068fd36b0ef838b9320ca9f5a9f0a5b..1f1dbd5349d34d63f97060c31ba924cdd8075f1d 100644 (file)
@@ -33,10 +33,15 @@ ModuleBase_WidgetLineEdit::ModuleBase_WidgetLineEdit(QWidget* theParent,
 {
   QFormLayout* aMainLay = new QFormLayout(this);
   ModuleBase_Tools::adjustMargins(aMainLay);
-  QString aTitle = QString::fromStdString(theData->widgetLabel());
+  QString aLabelText = QString::fromStdString(theData->widgetLabel());
+  QString aLabelIcon = QString::fromStdString(theData->widgetIcon());
+  QLabel* aLabel = new QLabel(aLabelText, this);
+  if (!aLabelIcon.isEmpty())
+    aLabel->setPixmap(QPixmap(aLabelIcon));
+
   myLineEdit = new QLineEdit(this);
   myLineEdit->setMinimumHeight(20);
-  aMainLay->addRow(aTitle, myLineEdit);
+  aMainLay->addRow(aLabel, myLineEdit);
   this->setLayout(aMainLay);
 
   connect(myLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged()));