Dakota B
Dakota B

Reputation: 138

Is there a method for making a MainWindow windows taskbar icon blink?

I am designing an application which needs to be able to get the user's attention. I play a ding sound and open up a notification dialog window, but I would also like the application's taskbar icon to flash the way that an installer that needs your permission does.

This is for a Windows 7 application, although I would prefer a cross-platform solution if one is available. Other resources I've seen suggest that that should be a side effect of using QWidget::show(), however I have not been able to reproduce this.

I expect the taskbar icon to look like this windows explorer notification telling me it has a conflict while copying files:

Windows 7 Taskbar icon flashing

Upvotes: 2

Views: 1264

Answers (1)

SolidMercury
SolidMercury

Reputation: 1021

In windows, you should use FlashWindowEx function which takes FLASHWINFO strcuture as argument with which you can control parameters like how long to flash, flash interval, what to flash(taskbar, window) etc..


For Qt, refer void QApplication::alert(QWidget *widget, int msec = 0);

Upvotes: 3

Related Questions