QSqlQuery query;
query.exec(QString("select price from brand where name='%1' and type='%2'")
.arg(brand).arg(ui->sellTypeComboBox->currentText())); query.next(); //这里
ui->sellPriceLineEdit->setEnabled(true);
ui->sellPriceLineEdit->setReadOnly(true);
ui->sellPriceLineEdit->setText(query.value(0).toString());
query.exec(QString("select last from brand where name='%1' and type='%2'")
.arg(brand).arg(ui->sellTypeComboBox->currentText()));
query.next();
int num = query.value(0).toInt();