diff --git a/softwareDirectory/AutoVerScheme/checkwindow.cpp b/softwareDirectory/AutoVerScheme/checkwindow.cpp index b2a1735..cf8f54a 100644 --- a/softwareDirectory/AutoVerScheme/checkwindow.cpp +++ b/softwareDirectory/AutoVerScheme/checkwindow.cpp @@ -437,7 +437,8 @@ QPushButton *button = new QPushButton(sLabel, this); //设置样式 // 设置按钮大小为 56x20 - button->setFixedSize(85, 40); + //固定大小文字显示不全 + //button->setFixedSize(85, 40); button->setCheckable(true); button->setAutoExclusive(true); //设置第一个按钮选中状态 @@ -467,7 +468,9 @@ pageButtons.append(button); ++index; } - QStringList info = gaugeInfo[0]; + QStringList info; + if(gaugeInfo.length()>0) + info = gaugeInfo[0]; ui->HeadListLayout->addStretch(); if(iEquipType==4){ @@ -1013,12 +1016,15 @@ int col = index.column(); QLayoutItem *child = pushButton_->parentWidget()->layout()->itemAt(1); QLineEdit* editCtrl = qobject_cast(child->widget()); + double dStep=1; + if(gaugeInfo.length()>0) + dStep = gaugeInfo[0].at(8).toDouble(); if(editCtrl!=nullptr){ double dVal = editCtrl->text().toDouble(); if(bAdd) - dVal+=1; + dVal+=dStep; else - dVal-=1; + dVal-=dStep; editCtrl->setText(QString::number(dVal)); } if(col==2||col==3){ @@ -1027,9 +1033,9 @@ if(editCtrl!=nullptr){ double dVal = editCtrl->text().toDouble(); if(bAdd) - dVal+=1; + dVal+=dStep; else - dVal-=1; + dVal-=dStep; editCtrl->setText(QString::number(dVal)); } }