diff --git a/src/v4l2sinkproperties.cpp b/src/v4l2sinkproperties.cpp index 22f334e..d03f64f 100644 --- a/src/v4l2sinkproperties.cpp +++ b/src/v4l2sinkproperties.cpp @@ -44,6 +44,7 @@ V4l2sinkProperties::V4l2sinkProperties(QWidget *parent) : ui->comboBox_format->addItem(V4L2SINK_RGB32, V4L2SINK_RGB32); ui->comboBox_format->setCurrentIndex( ui->comboBox_format->findText(format)); + connect(ui->comboBox_format, SIGNAL(currentIndexChanged(int)), this, SLOT(onComboChanged())); ui->label_warning->setStyleSheet("QLabel { color : red; }"); enableStart(true); @@ -99,6 +100,11 @@ void V4l2sinkProperties::onStop() v4l2sink_disable(); } +void V4l2sinkProperties::onComboChanged () +{ + setWarningText(""); +} + void V4l2sinkProperties::enableStart(bool enable) { ui->pushButton_start->setEnabled(enable); diff --git a/src/v4l2sinkproperties.h b/src/v4l2sinkproperties.h index 5c8dab4..34c96e6 100644 --- a/src/v4l2sinkproperties.h +++ b/src/v4l2sinkproperties.h @@ -44,6 +44,7 @@ class V4l2sinkProperties : public QDialog private Q_SLOTS: void onStart(); void onStop(); + void onComboChanged(); private: Ui::V4l2sinkProperties *ui;