| | |
| | | ui->tableWidget->setColumnWidth(2,80); |
| | | ui->tableWidget->setColumnWidth(4,ui->tableWidget->columnWidth(4)+15); |
| | | initUi(); |
| | | searchComName(); |
| | | } |
| | | |
| | | ClientMainWindow::~ClientMainWindow() |
| | | { |
| | | delete ui; |
| | | } |
| | | void ClientMainWindow::searchComName() |
| | | { |
| | | QSqlQuery query; |
| | | QString sql = QString("select id,name,code from company_info"); |
| | | if(query.exec(sql)){ |
| | | qDebug()<<"size:"<<query.numRowsAffected(); |
| | | while(query.next()){ |
| | | int id = query.value(0).toInt(); |
| | | QString name = query.value(1).toString(); |
| | | QString code = query.value(2).toString(); |
| | | qDebug()<<"com select:"<<id<<name; |
| | | m_comInfo[name] = id; |
| | | //m_comCode[name] = code; |
| | | ui->comboBox_company->addItem(name); |
| | | } |
| | | } |
| | | } |
| | | |
| | | void ClientMainWindow::initUi() |
| | |
| | | // 隐藏掉某个选项 |
| | | ui->tabWidget->removeTab(3); // OK |
| | | |
| | | // 问题整改台账 |
| | | m_proRecStandingBook = new ProblemRectStandingBook(this); |
| | | ui->tabWidget->addTab(m_proRecStandingBook,"问题整改台账"); |
| | | |
| | | // 关联各个功能槽 |
| | | connect(m_coverInfo,SIGNAL(sendComName(QString)),m_searchInfo,SLOT(addComName(QString))); |
| | | |
| | |
| | | connect(this,SIGNAL(sendDataToPunish(QVariantList)),m_punish,SLOT(showData(QVariantList))); |
| | | connect(this,SIGNAL(sendDataToCaseClue(QVariantList)),m_caseClue,SLOT(showData(QVariantList))); |
| | | |
| | | // 新版本 |
| | | m_conInfo2 = new ConverInfo2(this); |
| | | ui->tabWidget->addTab(m_conInfo2,"基本信息"); |
| | | |
| | | |
| | | } |
| | | |