Hi, all
I have code:
Qt Code:
  1. #include <QtGui/QApplication>
  2. #include <QHBoxLayout>
  3. #include <QLabel>
  4. #include <QDateTime>
  5. #include <QString>
  6. #include <time.h>
  7.  
  8. int main(int argc, char *argv[])
  9. {
  10. QApplication a(argc, argv);
  11. QWidget* w =new QWidget;
  12. QHBoxLayout* lyaout = new QHBoxLayout;
  13. QLabel* label;
  14. time_t seconds;
  15.  
  16. QDateTime* date_f = new QDateTime;
  17. QString milisec;
  18. QString format="mmssz";
  19. QString & need_f=format;
  20. seconds=time(NULL);
  21. date_f->setTime_t(seconds);
  22. milisec=date_f->toString(need_f);
  23.  
  24. label = new QLabel(milisec);
  25. lyaout->addWidget(label);
  26.  
  27. w->setWindowTitle("Try again");
  28. w->setLayout(lyaout);
  29. w->show();
  30.  
  31. return a.exec();
  32. }
To copy to clipboard, switch view to plain text mode 

date_f->setTime_t(seconds) don't return time in milliseconds.
Why is? What method can return time in milliseconds?

Thanks.