如何正确显示QT上的时间戳?

如何正确显示QT上的时间戳?,qt,qt4,timestamp,Qt,Qt4,Timestamp,我尝试在qt上获取当前时间(时间戳) myvar1=QDateTime::currentMSecsSinceEpoch(); qDebug()可能的原因是您不正确地声明了myvar1。将其声明为quint64 quint64 myvar1 = QDateTime::currentMSecsSinceEpoch(); qDebug() << myvar1; quint64 myvar1=QDateTime::currentMSecsSinceEpoch(); qDebug()myva

我尝试在qt上获取当前时间(时间戳)

myvar1=QDateTime::currentMSecsSinceEpoch();

qDebug()可能的原因是您不正确地声明了
myvar1
。将其声明为
quint64

quint64 myvar1 = QDateTime::currentMSecsSinceEpoch();
qDebug() << myvar1;
quint64 myvar1=QDateTime::currentMSecsSinceEpoch();

qDebug()myvar1的类型是什么?
quint64 myvar1 = QDateTime::currentMSecsSinceEpoch();
qDebug() << myvar1;