sqldata_w/mainwindow.cpp
// Save edit line content to combobox list
Save edit line content to combobox list
Save edit line content to combobox list
void MainWindow::SaveEditLineToComboBox(QComboBox *comboBox)
{
    QString line = comboBox->lineEdit()->text();
    if(!line.isEmpty() && comboBox->findText(line) == -1)
    {
        comboBox->insertItem(0, line);
        comboBox->setCurrentIndex(0);
    }
}
void MainWindow :: SaveEditLineToComboBox ( QComboBox * comboBox ) { QString line = comboBox -> lineEdit ( ) -> text ( ) ; if ( ! line . isEmpty ( ) && comboBox -> findText ( line ) == -1 ) { comboBox -> insertItem ( 0 , line ) ; comboBox -> setCurrentIndex ( 0 ) ; } }
Save edit line content to combobox list
Save edit line content to combobox list
// Check that current edit line value is not in combo box