Qt-interest Archive, July 2007
FW: Re: QT4.3 coordinate oddness
Message 1 in thread
Hi,
I have a question about the QT coordinate system; it was discussed last
februari apparently (I just started with Qt):
> I had similar issues. Even though the coordinate system is documented
> in the view/scene as having the origin in the upper left, we all grew
> up learning to think of the origin in the
> lower left. I solved the problem by using a call to scale to flip
> the view/scene around
> X axis:
> originalDataScene_ = new QGraphicsScene(this);
> ui.originalDataView->setScene(originalDataScene_);
> ui.originalDataView->scale(1.0,-1.0);
> -Dennis
I also tried to use the negative scale for the y axis. It works drawing your
own lines, but the QT system still thinks the y-axis is downwards, and as a
results, if you use the Qpainter drawing facilities such as drawText()
results are flipped on the x-axis. Which is understandable, but how can you
let it use the 'normal' coordinate system where the origin is lower-left?
Anyone any idea?
Markus Heukelom
--
[ signature omitted ]