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);
}