[Qt-interest] QGraphicsView coordinates
Phil
phillor at telstra.com
Tue Dec 16 09:50:57 CET 2008
Thank you for reading this.
I'm trying to modernise an application that I created eight years ago and have
run into a display problem. In that application I have displayed a map, some
text and ploted a few points.
This is how I had achieved that using Qt3 but that option seems not to be
available under Qt4. I can now only paint on a dialog and not a frame. The
following now fails on the paint constructor. "mapFrame" is a frame on a main
window dialog created with Designer and "paintMap" is a function that draws
the pixmap graphic and adds the text.
void pest::paintEvent(QPaintEvent*)
{
QPainter paint(mapFrame,this);
paintMap(&paint);
}
If I can no longer paint on a frame (maybe I still can but with a different
method) can I use QGraphicsView instead? If so, how do I pass coordinates to
QGraphicsScene so that, for instance, I can place text at a particular fixed
point?
--
Regards,
Phil.
More information about the Qt-interest-old
mailing list