hi I need the equivalent code of the below VC++ code in QT.
while (::PeekMessage (&msg, NULL, 0, 0, PM_nn))
{
::TranslateMessage (&msg);
:ispatchMessage (&msg);
}
hi I need the equivalent code of the below VC++ code in QT.
while (::PeekMessage (&msg, NULL, 0, 0, PM_nn))
{
::TranslateMessage (&msg);
:ispatchMessage (&msg);
}
That's the event loop you're asking for.
It can be replaced by QApplication::exec() or by a starting the event loop in a worker thread.
BTW: you can't port an application line by line. maybe you can give more details such as the context in which those statements are used.
Actually i need to use this while iterating through a directory.
Then maybe QCoreApplication::processEvents is more suitable
Thanks a lot
Or much better - don't iterate over a directory but
a) use QDir/QFileInfo
b) use a QThread to not block the gui
Bookmarks