PDA

View Full Version : balloon message in Qt



wagmare
26th March 2009, 06:23
hi friends,
is it possible to use balloon messages in an icon on qt application like system tray
example ... only way is to use tooltip ..? is it any other way..?
some suggestion please ...

talk2amulya
26th March 2009, 06:30
no, AFAIK there is no way of showing such thing, although u can always easily create your own tooltip..i recently created one for my project after finding out that no other way of showing tooltip in qt other than setTooltip.

wagmare
26th March 2009, 06:40
no, AFAIK there is no way of showing such thing, although u can always easily create your own tooltip..i recently created one for my project after finding out that no other way of showing tooltip in qt other than setTooltip.

and to show the message u use global position ...? or any thing other to show a message when some operation occurs ..
for example ..
in my case i want to display a message when communication failed .. i am having a QPushbutton .. over the button i want to show a sudden message that "Communication failed in ... device" and if the user clicks the button then i show the device status ..
so how to show the tooltip in the exact position over the button ..?

please help ..

talk2amulya
26th March 2009, 06:50
well, u can get the rect of QPushButton, take a proper point from there(try to use global point) and in your custom tooltip, u can have a function like showTooltip(QPoint &point)..it will be easier if u use this point as the arrow of balloon message.

wagmare
26th March 2009, 06:52
right .. i will do i that way ...

aamer4yu
26th March 2009, 16:37
You will need to catch QEvent::ToolTip and display your custom widget / tooltip.

Also for having balloon like shaped tip, you can have a look at this link (http://doc.trolltech.com/qq/qq24-textlayouts.html) :)