PDA

View Full Version : How do I create a popup message widget,and make it gradually transparent.



MorrisLiang
17th May 2010, 07:06
I want to make a notification widget,just like the one in Linux.
http://hackadaycom.files.wordpress.com/2009/09/simple_linux_notifications.jpg

And I want it gradually transparent.
I think of serveral directions to do this:
1.use Animation Framework to tween it.
2.tween it in a loop in another thread.
3.set a qtimer,and each time the timer times out,I make it less visible.

Anyone tells me what is better?Or maybe they are not good plan for that...:confused:

wysota
17th May 2010, 08:39
But what exactly is the problem? Forget about threads, I can tell you that.

MorrisLiang
17th May 2010, 17:26
lol....I don't know how to express...
Ok,I am creating a widget.This widget will transit from opaque to transparent within 1 sec.So,how do I acheive this effect?

wysota
17th May 2010, 17:28
What did you already try?

MorrisLiang
18th May 2010, 03:13
I haven't try yet,but I guess timer is the easiest way.:confused:

wysota
18th May 2010, 13:01
So try something first and come back with specific questions if you encounter problems.

squidge
18th May 2010, 13:39
I haven't try yet,but I guess timer is the easiest way.:confused:You seem to be answering your own questions :) Keep this up and you'll soon be a Qt pro :)

(and don't forget Qt Assistant is there to help, along with plenty examples and demos)

aamer4yu
18th May 2010, 13:49
Also look at QTimeLine...