Qt-interest Archive, June 2007
Overlapping Qt Widgets? Static QGraphicsItem? Need solution for static item on a QGraphicsView
Message 1 in thread
I'm writing an application that uses the graphics view framework to
visualize a map. I want to have a map legend overlap my QGraphicsView
widget and display different things depending on what the user is
looking at.
However, I can't find an easy solution to this problem. I've thought of
overlapping a QWidget on top of the QGraphicsView - but I've read this
isn't supported or endorsed by qt. This also wouldn't let me move the
legend widget around the map - I would have to put it in the same layout
position as the QGraphicsView widget. Then I considered using a
QGraphicsItem that represents the legend and just place this directly on
the scene. However, there is no way to keep this item static on the
screen if the user wants to scroll around - I would have to manually
reposition the item every time, which would be too slow for my needs.
Does anyone have any ideas for solving this problem? I thought it would
be a pretty common function in Qt to be able to float one widget on top
of another... any help is much appreciated.
-Chris Portka
--
[ signature omitted ]