I'm using the simple example from tutorial to show an rectangle on a scene.
As I understand the axises are in the middle of the graphicalView, right?
What I don't understand is why changing x,y of rectangle doesn't do anything.

Here is the code

Qt Code:
  1. QtGuiApplication1::QtGuiApplication1(QWidget *parent)
  2. : QMainWindow(parent)
  3. {
  4. ui.setupUi(this);
  5.  
  6. ui.graphicsView->setBackgroundBrush(Qt::red);
  7. _graphicsScene = new QGraphicsScene(this);
  8. ui.graphicsView->setScene(_graphicsScene);
  9.  
  10.  
  11. QBrush redBrush(Qt::yellow);
  12. QPen blackPen(Qt::black);
  13. blackPen.setWidth(6);
  14. _graphicsScene->addRect(0, 0, 100, 100, blackPen, redBrush);
  15. }
To copy to clipboard, switch view to plain text mode 


The result
Untitled.jpg

Even if I change x,y of the rect to
Qt Code:
  1. addRect(50, 50, 100, 100, blackPen, redBrush)
To copy to clipboard, switch view to plain text mode 
or
Qt Code:
  1. addRect(10000, 10000, 100, 100, blackPen, redBrush)
To copy to clipboard, switch view to plain text mode 
it shows the same position of the rectangle. Why?
Untitled.jpg