SyntaxFix
Write A Post
Hire A Developer
Questions
In Qt 4.7, there is the QDateTime::currentMSecsSinceEpoch() static function, which does exactly what you need, without any intermediary steps. Hence I'd recommend that for projects using Qt 4.7 or newer.
QDateTime::currentMSecsSinceEpoch()