while (!file2.atEnd()) {
QString comHora
= lineaHora.
left(6);
QString comMinuto
= lineaHora.
right(5);
// asi me coge la hora
//BIEN QTime dias = QTime::fromString(comHora,"hms");
//QDateTime dias = QDateTime::fromString(comHora,"dd/MM/yy");
//QDate dia = QDate::fromString(comHora,"yyMMdd");
//QString pepelu = comHora+comMinuto;
QString pepelu
= lineaHora.
left(6)+lineaHora.
right(5);
//BIEN hora->setText("Timess: " + dia.toString("yyMMdd"));
// hora->setText("Timess: " + dias.toString("yyMMdd"));
hora->setText("Timess: " + dias.toString("yyMMddhhmm"));
QMessageBox::information(this,
"resultado",lineaHora.
left(6));
QMessageBox::information(this,
"resultado",lineaHora.
right(5));
//QMessageBox::information(this, "resultado",dia.toString());
//item->setText(line2);
//tabla->setItem(c,1,item);
//c++;
}
}
file2.open(QIODevice::ReadOnly);
while (!file2.atEnd()) {
QByteArray lineaHora = file2.readLine();
QString comHora = lineaHora.left(6);
QString comMinuto = lineaHora.right(5);
// asi me coge la hora
//BIEN QTime dias = QTime::fromString(comHora,"hms");
//QDateTime dias = QDateTime::fromString(comHora,"dd/MM/yy");
//QDate dia = QDate::fromString(comHora,"yyMMdd");
//QString pepelu = comHora+comMinuto;
QString pepelu = lineaHora.left(6)+lineaHora.right(5);
QDateTime dias = QDateTime::fromString(pepelu,"yyMMddhhmm");
//BIEN hora->setText("Timess: " + dia.toString("yyMMdd"));
// hora->setText("Timess: " + dias.toString("yyMMdd"));
hora->setText("Timess: " + dias.toString("yyMMddhhmm"));
QMessageBox::information(this, "resultado",pepelu);
QMessageBox::information(this, "resultado",lineaHora.left(6));
QMessageBox::information(this, "resultado",lineaHora.right(5));
//QMessageBox::information(this, "resultado",dia.toString());
//item->setText(line2);
//tabla->setItem(c,1,item);
//c++;
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks