Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

when video format changed, clear the last warning message #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/v4l2sinkproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -99,6 +100,11 @@ void V4l2sinkProperties::onStop()
v4l2sink_disable();
}

void V4l2sinkProperties::onComboChanged ()
{
setWarningText("");
}

void V4l2sinkProperties::enableStart(bool enable)
{
ui->pushButton_start->setEnabled(enable);
Expand Down
1 change: 1 addition & 0 deletions src/v4l2sinkproperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class V4l2sinkProperties : public QDialog
private Q_SLOTS:
void onStart();
void onStop();
void onComboChanged();

private:
Ui::V4l2sinkProperties *ui;
Expand Down