[SOLVED]QTime::currentTime() Error
-
Hi,
Im trying to get the current time using the function above , but i get the error :[quote]
C:\Qt\Qt5.3.1\5.3\msvc2013\include\QtCore\qdatetime.h:122: error: C2589: '(' : illegal token on right side of '::'
[/quote]My code is :
@
QString time = QTime::currentTime().toString("hh:mm:ss");
ui->console_textEdit->append(time+": ");
@I tried Also :
@
QString time = QTime::currentTime().toString();
ui->console_textEdit->append(time+": ");
@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 .