View Full Version : Possible Qt Bug: Tool Tips on QTreeView using Proxy Widget with IgnoreTransformations

2nd December 2011, 21:02
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?


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.


4th December 2011, 15:58
Rather than ignoring transformations, try applying an inverted transformation matrix to your proxy widget: