Results 1 to 8 of 8

Thread: Child QGraphicsItem setToolTip does not override parent QGraphicsItem's tooltip

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Location
    Boulder, Colorado, USA
    Posts
    70
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Child QGraphicsItem setToolTip does not override parent QGraphicsItem's tooltip

    My QGraphicsItem subclass "parent" item contains two nested levels of children QGraphicsItem [in Qt 4.6.3]. I want the lowest level child QGraphicsItem (a QGraphicsRectItem) to have a tooltip which OVERRIDES the parent's tooltip. But only the parent tooltip is showing up.

    The child QGraphicsItem is calling this method in its constructor:
    setAcceptHoverEvents (true);

    The containing QMainWindow subclass constructor -- and also the QGraphicsView subclass constructor -- are calling this:
    setAttribute (Qt::WA_AlwaysShowToolTips);

    Why isn't the nested child QGraphicsItem's "setToolTip()" having an effect?

    Thank you in advance,
    Phil Weinstein, CADSWES
    Boulder CO USA
    Last edited by philw; 25th November 2010 at 20:42.

Similar Threads

  1. QGraphicsItem::setToolTip does not work
    By Nadia in forum Qt Programming
    Replies: 2
    Last Post: 6th September 2009, 19:54
  2. Qgraphicsitem parent/child paint problem.
    By repka3 in forum Qt Programming
    Replies: 1
    Last Post: 24th July 2009, 22:03
  3. Casting QGraphicsItem child from QGraphicsItem
    By patrik08 in forum Qt Programming
    Replies: 3
    Last Post: 29th August 2008, 15:37
  4. Replies: 9
    Last Post: 22nd June 2008, 22:26
  5. QGraphicsItem tooltip behavior
    By darksaga in forum Qt Programming
    Replies: 6
    Last Post: 22nd August 2007, 17:50

Tags for this Thread

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.