Gui: fix possible problems with new style connect
* In UIntSpinBox rename the signal to not overwrite the signal of the base class * In UIntSpinBox use the (ambiguous) signal 'valueChanged' of the base class QSpinBox * To avoid that connect() fails use the function pointer of the Qt class where the signal is defined
This commit is contained in:
@@ -91,7 +91,7 @@ InputField::InputField(QWidget * parent)
|
||||
iconLabel->setPixmap(pixmap);
|
||||
iconLabel->setStyleSheet(QString::fromLatin1("QLabel { border: none; padding: 0px; }"));
|
||||
iconLabel->hide();
|
||||
connect(this, &Gui::InputField::textChanged, this, &InputField::updateIconLabel);
|
||||
connect(this, &QLineEdit::textChanged, this, &InputField::updateIconLabel);
|
||||
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
|
||||
setStyleSheet(QString::fromLatin1("QLineEdit { padding-right: %1px } ").arg(iconLabel->sizeHint().width() + frameWidth + 1));
|
||||
QSize msz = minimumSizeHint();
|
||||
@@ -100,7 +100,7 @@ InputField::InputField(QWidget * parent)
|
||||
|
||||
this->setContextMenuPolicy(Qt::DefaultContextMenu);
|
||||
|
||||
connect(this, &Gui::InputField::textChanged, this, &InputField::newInput);
|
||||
connect(this, &QLineEdit::textChanged, this, &InputField::newInput);
|
||||
}
|
||||
|
||||
InputField::~InputField()
|
||||
|
||||
Reference in New Issue
Block a user