#include "problemrectstandingbook.h" #include "ui_problemrectstandingbook.h" #include #include 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); } } }