Gui: Change label type to ExpressionLabel in ExpressionBinding

* Add function ExpressionBinding::makeLabel() and use it in subclasses to reduce code duplication
This commit is contained in:
wmayer
2021-04-02 17:46:42 +02:00
parent 64fb634ed1
commit 75bf85eb5b
7 changed files with 62 additions and 100 deletions

View File

@@ -40,6 +40,7 @@
#include "Command.h"
#include "InputField.h"
#include "BitmapFactory.h"
#include "QuantitySpinBox_p.h"
#include "propertyeditor/PropertyItem.h"
using namespace Gui;
@@ -78,7 +79,7 @@ InputField::InputField(QWidget * parent)
{
setValidator(new InputValidator(this));
setFocusPolicy(Qt::WheelFocus);
iconLabel = new QLabel(this);
iconLabel = new ExpressionLabel(this);
iconLabel->setCursor(Qt::ArrowCursor);
QPixmap pixmap = getValidationIcon(":/icons/button_valid.svg", QSize(sizeHint().height(),sizeHint().height()));
iconLabel->setPixmap(pixmap);