[Qt-interest] Active Window notification

Philippe Fremy phil at freehackers.org
Tue Mar 17 10:35:58 CET 2009


You rock ! And Qt rocks too :-)

cheers,

Philippe

Ankit Agarwal wrote:
> Hi,
> check out changeEvent(QEvent *event) and event->type() == 99.
> 99 is the code for Activation event.
> 
> Hope this helps.
> 
> On Tue, Mar 17, 2009 at 1:42 PM, Philippe Fremy <phil at freehackers.org
> <mailto:phil at freehackers.org>> wrote:
> 
> 
>     Hi,
> 
>     Is there any way to be notified when a Qt window becomes active ? I am
>     trying to play with focus events, but it's not very satisfying so far.
> 
>     Basically, I am displaying information in a QTextEdit widget and I want
>     to distinguish between "the window is the main window and the user has
>     seen the information" and "the window is not the main window, so I must
>     notify the user that new information is available, for example in the
>     systray".
> 
>     If the window was minmised or hidden, I want a way to detect when it's
>     coming back to front.
> 
>     cheers,
> 
> 
>     Philippe
> 
> 
>     _______________________________________________
>     Qt-interest mailing list
>     Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
>     http://lists.trolltech.com/mailman/listinfo/qt-interest
> 
> 
> 
> 
> -- 
> Regards,
> Ankit Agarwal
> SW Engineer
> Vegayan Systems
> email : ankit_agarwal at vegayan.com <mailto:ankit_agarwal at vegayan.com>
> Blog : http://ankit17.wordpress.com





More information about the Qt-interest-old mailing list