Hello everybody.

i have a quite simple problem but couldn't get along with it.

In the documentation, I've read that this code:

Qt Code:
  1. QPainter p(this);
  2. ...
  3. p.setWindow(-50,-50,100,100);
To copy to clipboard, switch view to plain text mode 

would create a painting environment with (0, 0) as the center. But if I try to paint an ellipse which should fill out the widget completely with the following code:

Qt Code:
  1. p.drawEllipse(-50,-50,100,100);
To copy to clipboard, switch view to plain text mode 

I get the following result:

app.png

So, obviously, the center is not (0, 0) but (-50, -50)?

I if draw the ellipse with:
Qt Code:
  1. p.drawEllipse(-100,-100,100,100);
To copy to clipboard, switch view to plain text mode 
I (almost) get the result i want to have:

app2.png

Well, this is not the coordinate system I expected. (0, 0) should be the center of my painting environment. What's my fault?

Greetings,
EMKAH