Originally Posted by
jpn
Why don't you compile and see yourself that it won't compile. QApplication::alert() takes a pointer to the window. I already gave you working code...
Oh haha, I overlooked my nose. When compiling with your example I get the follow error: conversationdialog.cpp:158: error: incomplete type `QApplication' used in nested name specifier..
Line 158 is now: QApplication::alert(this, 5000);
The complete function is:
void ConversationDialog::notifyUser()
{
#ifdef Q_WS_WIN
// Compiler gives error here, so comment out FLASHWINFO!
// FLASHWINFO info;
// ZeroMemory(&info, sizeof(info));
// info.cbSize = sizeof(info);
// info.hwnd = winId();
// info.dwFlags = 15;
// info.uCount = 3;
// ::FlashWindowEx(&info);
#endif
user->playNotification();
}
void ConversationDialog::notifyUser()
{
#ifdef Q_WS_WIN
// Compiler gives error here, so comment out FLASHWINFO!
// FLASHWINFO info;
// ZeroMemory(&info, sizeof(info));
// info.cbSize = sizeof(info);
// info.hwnd = winId();
// info.dwFlags = 15;
// info.uCount = 3;
// ::FlashWindowEx(&info);
QApplication::alert(this, 5000);
#endif
user->playNotification();
}
To copy to clipboard, switch view to plain text mode
I see nowhere defined 'this' but 'info' was defined as FLASHWINFO info;? Could I define this as QAPPLICATION this; ?
Bookmarks