I just found it is NOT easy to make a sleep call in Qt4. I wrote some code in Qt5 and have few QThread::msleep()
calls in my main()
and other places. I want to convert those code to Qt4 but cannot find an easy way to convert these msleep calls.
error: C2248: 'QThread::msleep' : cannot access protected member declared in class 'QThread'
Somebody suggested subclass the QThread class. Why I need to go that far? no simple way to just sleep a while?
sleep
in 99% of cases it means that you are doing something wrong.