hide comboBoxWordList if only one worlist present

This commit is contained in:
thez3ro 2017-03-17 00:44:51 +01:00
parent 1d32695f10
commit b6a7771a23
No known key found for this signature in database
GPG Key ID: F628F9E41DD7C073
2 changed files with 8 additions and 1 deletions

View File

@ -68,6 +68,13 @@ PasswordGeneratorWidget::PasswordGeneratorWidget(QWidget* parent)
QDir path(filePath()->dataPath("wordlists/"));
QStringList files = path.entryList(QDir::Files);
m_ui->comboBoxWordList->addItems(files);
if (files.size() > 1) {
m_ui->comboBoxWordList->setVisible(true);
m_ui->labelWordList->setVisible(true);
} else {
m_ui->comboBoxWordList->setVisible(false);
m_ui->labelWordList->setVisible(false);
}
loadSettings();
reset();

View File

@ -450,7 +450,7 @@ QProgressBar::chunk {
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="labelWordlist">
<widget class="QLabel" name="labelWordList">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>