void TransFormWidgetFromDepotoSaha::sendInformFromDepotoSaha(vector<QTreeWidgetItem *> myvec)
{
for(unsigned int i=0;i<myvec.size();i++){
newvec.push_back(myvec.at(i));
currentid.push_back(myvec.at(i)->text(6).toDouble());
ma = new QLineEdit();ma->setMinimumWidth(400);ms = new QLineEdit();
mb = new QLineEdit();tb = new QLineEdit();
ma->setText(myvec.at(i)->text(3));
ms->setText(myvec.at(i)->text(6));
mb->setText(myvec.at(i)->text(7));
tb->setText(myvec.at(i)->text(11));
layout = new QHBoxLayout();
layout->addWidget(ma);
layout->addWidget(ms);
layout->addWidget(mb);
layout->addWidget(tb);
ui->MainLayout->addLayout(layout);
}
}
void TransFormWidgetFromDepotoSaha::on_pushButton_clicked()
{
for(unsigned int i=0;i<newvec.size();i++){
qDebug()<<"value is : "<<ui->MainLayout->count();
QLayoutItem *ed = ui->MainLayout->takeAt(i);
newvec.at(i)->setText(6,ms->text());
double mycurr = currentid.at(i) - newvec.at(i)->text(6).toDouble();
QString temp = QString::number(mycurr);
if(mycurr>0){
warehousemainwaredb->updatebase(newvec.at(i)->text(0), temp );
}
else{
warehousemainwaredb->deletebase(newvec.at(i)->text(0));
}
}
startTransform(newvec);
}
Я хочу взять QLineEdit
текст с каждого QLineEdit
.Как я могу это сделать?