0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00

UI: Use input validator on resolution line edit

This commit is contained in:
Clayton Groeneveld 2020-01-27 23:45:49 -06:00
parent 3aa08c4e0f
commit a86912f0db

View File

@ -793,6 +793,11 @@ OBSBasicSettings::OBSBasicSettings(QWidget *parent)
channelIndex = ui->channelSetup->currentIndex();
sampleRateIndex = ui->sampleRate->currentIndex();
QRegExp rx("\\d{1,5}x\\d{1,5}");
QValidator *validator = new QRegExpValidator(rx, this);
ui->baseResolution->lineEdit()->setValidator(validator);
ui->outputResolution->lineEdit()->setValidator(validator);
}
OBSBasicSettings::~OBSBasicSettings()