[Qt-interest] QGraphicsView scaled background image and fixed foreground item - is that possible?
franki
franki at franki.eu.org
Mon Jun 6 16:00:43 CEST 2011
Hi all,
Is this possible?
I want to have background image (QGraphicsPixmapItem) with some items as a
child items, and that will be scaled by fitInView, so the user can see complete
image, or a part of the image if I scale to some rectangle (fitInView(RectF)).
On the same view I need to draw some buttons (from time to time), eg. when
user clicks external (outside from QGraphicsView) button, I need to draw some
buttons on top of the background image, but regardless of the scale of
background image, buttons should have the same fixed size, and position.
Currently I draw the buttons earlier, hide them, and when user needs to
see them I rescale, reposition, and then show them in QGraphicsView
accordingly to the scale of the background image, but it would be great to
draw in fixed coordinates regardless of the scale of the background image.
best regards
Marek
More information about the Qt-interest-old
mailing list