Hi,
I am getting result of below code blank.
is the format for time correct?
what could be the problem?
#include <QtGui>
#include <QDateTime>
#include <QTime>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QPushButton *button3 = new QPushButton;
QString StartT;
StartT = "24-1-2013 23:51:52:345";
QDateTime StDt = QDateTime::fromString(StartT, "d-M-yyyy h:m:s:z");
QTime T1;
T1=StDt.time();
QString T2s = T1.toString("h:m:s:z");
button3->show();
button3->setText(T2s);
return a.exec();
}
Thanks,
Sanujas
Bookmarks