From ee8fd00cc388e7ee9217e06458eec5f6bbc97f4f Mon Sep 17 00:00:00 2001 From: simonyan <315082291@qq.com> Date: Sat, 26 Oct 2024 13:37:32 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=AE=9E=E7=8E=B0=E4=BA=95=E7=9A=84?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=92=8C=E5=A4=9A=E9=80=89=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/nmNum/nmSubWnd/nmSubWndMain.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Src/nmNum/nmSubWnd/nmSubWndMain.cpp b/Src/nmNum/nmSubWnd/nmSubWndMain.cpp index d34d046..7611888 100644 --- a/Src/nmNum/nmSubWnd/nmSubWndMain.cpp +++ b/Src/nmNum/nmSubWnd/nmSubWndMain.cpp @@ -703,16 +703,18 @@ void nmSubWndMain::selectWell() int wellCount = zxCurProject->getChildrenCount(iDataModelType::sTypeWell); ZxDataObjectList wellList = zxCurProject->getChildren(iDataModelType::sTypeWell); nmDataLogFile::getInstance()->writeLog(QString(" %1 %2").arg(wellCount).arg(wellList.size())); + QStringList wellNames; + QList wellCodes; for (int i = 0; i < wellList.size(); i++) { ZxDataObject* wellObj = wellList[i]; nmDataLogFile::getInstance()->writeLog(wellObj->getName() + " " + wellObj->getCode()); + wellNames.append(wellObj->getName()); + wellCodes.append(wellObj->getCode()); } nmWxSelectWellsDlg* dlg = new nmWxSelectWellsDlg(this); - nmWxSelectWellsWidget *comboBox = new nmWxSelectWellsWidget(this); - comboBox->addItem("Option 1", 1); - comboBox->addItem("Option 2", 2 ); - comboBox->addItem("Option 3", 3); - dlg->setWidget(comboBox); + nmWxSelectWellsWidget *wellListWidget = new nmWxSelectWellsWidget(this); + wellListWidget->addItems(wellNames, wellCodes); + dlg->setWidget(wellListWidget); if(dlg->exec() == QDialog::Accepted) { // 用户点击了“确定”按钮 nmDataLogFile::getInstance()->writeLog(" OK "); @@ -789,4 +791,4 @@ void nmSubWndMain::triggerToolBarAction(int index) bool nmSubWndMain::onConfirmClosing() { return iSubWndBaseAF::onConfirmClosing(); -} \ No newline at end of file +}