Quantcast
Viewing all articles
Browse latest Browse all 4972

About using QDateTime::fromString

I wanna translate time string from sqlite to QDateTime , but It seamed failed , here’s the code :  QDateTime curDate = QDateTime::currentDateTime();    QDateTime date = QDateTime::fromString( "2013-1-12 14:53:42" , "yyyy-MM-dd hh:mm:ss" );  QString strDate,strTime;  do  {   strDate = date.date().toString();//empty   strTime = date.time().toString();//empty  } while (false); what’s wrong?

Viewing all articles
Browse latest Browse all 4972

Trending Articles