Results 1 to 2 of 2

Thread: Possible Qt Bug: Tool Tips on QTreeView using Proxy Widget with IgnoreTransformations

  1. #1
    Join Date
    Mar 2011
    Posts
    25
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Possible Qt Bug: Tool Tips on QTreeView using Proxy Widget with IgnoreTransformat

    I'm using a QGraphicsScene and need an embedded QTreeView, which I've done using a QGraphicsProxyWidget, and for the most part, it's working fine. I have ItemIgnoresTransformations set on the proxy widget because the scene's aspect ratio may change, and I don't want the text distorted. However, I also need tool tips on some of the items in the tree view, and it appears that the combination of these items is confusing Qt as to which row the mouse cursor is over.

    For instance, if I have a situation where five consecutive rows have tool tips associated with one of the columns, with ItemIgnoresTransformations, the tool tip may be accurate for the first couple of rows, and then it won't detect the hover at all for a row or two, and then I'll start getting tool tips for the row following the one I'm actually on, and the situation gets progressively worse as I move down the screen.

    Without ItemIgnoresTransformations, the tool tips work fine. I'm using Qt 4.7.1 currently; I'll be upgrading to the current release soon. Has anyone hit this problem, and is there a work-around?

    Thanks,
    Doug


    Added after 32 minutes:


    I've also found that the visualRect method of the QTreeView appears to be returning values that are transformed, so the dialog box that I pop up when the user clicks on an item is misplaced. Without ItemIgnoresTransformations, it works as expected.

    Doug
    Last edited by Goug; 2nd December 2011 at 20:02.

  2. #2
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Possible Qt Bug: Tool Tips on QTreeView using Proxy Widget with IgnoreTransformat

    Rather than ignoring transformations, try applying an inverted transformation matrix to your proxy widget:
    Qt Code:
    1. proxyWidget->setTransform(graphicsView->viewportTransform().inverted());
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. complex search proxy for QTreeView
    By brixton in forum Newbie
    Replies: 1
    Last Post: 19th November 2010, 22:10
  2. Taking a screenshot of a proxy widget in qtgraphicsview
    By technoViking in forum Qt Programming
    Replies: 0
    Last Post: 23rd October 2010, 18:08
  3. how to set setRect for proxy widget
    By wagmare in forum Qt Programming
    Replies: 0
    Last Post: 23rd November 2008, 13:46
  4. Customizing a Widget's Tool Tip.
    By Cutey in forum Qt Programming
    Replies: 1
    Last Post: 24th July 2008, 08:08
  5. Proxy widget
    By elcuco in forum Qt Programming
    Replies: 2
    Last Post: 18th June 2008, 19:53

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.