#include "problemrectstandingbook.h" #include "ui_problemrectstandingbook.h" #include #include #pragma execution_character_set("utf-8") ProblemRectStandingBook::ProblemRectStandingBook(QWidget *parent) : QMainWindow(parent), ui(new Ui::ProblemRectStandingBook) { ui->setupUi(this); searchComName(); } ProblemRectStandingBook::~ProblemRectStandingBook() { delete ui; } void ProblemRectStandingBook::searchComName() { QSqlQuery query; QString sql = QString("select id,name,code from company_info"); if(query.exec(sql)){ qDebug()<<"size:"<comboBox_company->addItem(name); } } } void ProblemRectStandingBook::on_pushButton_4_clicked() { // 添加到表格中 qDebug()<<"添加数据"; } void ProblemRectStandingBook::on_pushButton_5_clicked() { // 写到数据库 qDebug()<<"保存数据"; }