Im trying to get the current time using the function above , but i get the error :
C:\Qt\Qt5.3.1\5.3\msvc2013\include\QtCore\qdatetime.h:122: error: C2589: '(' : illegal token on right side of '::'
My code is :
QString time = QTime::currentTime().toString("hh:mm:ss");
I tried Also :
QString time = QTime::currentTime().toString();
I also included : <QTime>
What could be the problem ?
Sounds like "this one":http://qt-project.org/forums/viewthread/22133
Do you happen to include windows.h or any other windows headers?
Thanks yeah that worked .