Results 1 to 4 of 4

Thread: Draw Custom widget

  1. #1
    Join Date
    Jan 2011
    Location
    Sri Lanaka
    Posts
    64
    Thanks
    39
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Draw Custom widget

    Hello,
    i need to draw widget like this

    Untitled.png

    need some guidance... i have no knowledge about custom drawing..

    I was thinking of something like QSystemTrayIcon message notifier..
    pops up and shows the message and fades away after sometime..
    Last edited by deepal_de; 26th May 2011 at 07:05.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Draw Custom widget

    can't you use Tool Tip

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

    deepal_de (26th May 2011)

  4. #3
    Join Date
    Jan 2011
    Location
    Sri Lanaka
    Posts
    64
    Thanks
    39
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Draw Custom widget

    Now im using the tool tip for that function, but need something like tray icon message.. something that user will notice..
    there is a possibility of user ignoring the tool tip know... but this will catch the eye of the user...
    QMessageBox is the last option..
    any ideas??
    is there any way of using QSystemTrayIcon::showMessage to my custom widget??

  5. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Draw Custom widget

    you can force to show tool tip even if mouse is not over it
    Qt Code:
    1. QToolTip::showText(this->pos(),"Look at Me"); //this is a QWidget
    To copy to clipboard, switch view to plain text mode 

  6. The following user says thank you to Santosh Reddy for this useful post:

    deepal_de (26th May 2011)

Similar Threads

  1. Draw background of custom widget
    By lumiss in forum Qt Programming
    Replies: 0
    Last Post: 24th August 2010, 09:33
  2. Cant't draw custom grid
    By Tottish in forum Qwt
    Replies: 4
    Last Post: 1st May 2010, 09:55
  3. Replies: 1
    Last Post: 10th December 2009, 21:31
  4. To draw a custom scale
    By Indalo in forum Qwt
    Replies: 1
    Last Post: 30th November 2009, 13:24
  5. Draw contents of widget in another widget
    By gustavosbarreto in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 14:43

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.