Results 1 to 6 of 6

Thread: balloon message in Qt

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default balloon message in Qt

    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 ...

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: balloon message in Qt

    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.

  3. The following user says thank you to talk2amulya for this useful post:

    wagmare (26th March 2009)

  4. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: balloon message in Qt

    Quote Originally Posted by talk2amulya View Post
    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 ..

  5. #4
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: balloon message in Qt

    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.

  6. #5
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: balloon message in Qt

    right .. i will do i that way ...

  7. #6
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: balloon message in Qt

    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

  8. The following 3 users say thank you to aamer4yu for this useful post:

    alizadeh91 (20th August 2013), Chromatix (19th July 2014), wagmare (30th March 2009)

Similar Threads

  1. Replies: 4
    Last Post: 12th October 2008, 13:47
  2. How to Compile VTKDesigner2 with Qt?
    By alfredoaal in forum Newbie
    Replies: 0
    Last Post: 5th September 2008, 05:34
  3. treewidget and a message system
    By alisami in forum Qt Programming
    Replies: 7
    Last Post: 27th July 2008, 18:05
  4. QSystemTrayIcon: Overridden balloon msg
    By further in forum Qt Programming
    Replies: 2
    Last Post: 17th April 2008, 10:58
  5. statusBar() message color change
    By mclark in forum Qt Programming
    Replies: 2
    Last Post: 7th August 2007, 23:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.