Yeah i know that this work but i need to draw with fonctions. I successed to do that but I don't want to have the GraphicsView at the beginning of the program, and i want to add draws like an Ellipse (and the image) when i click on buttons.
These lines could just as well happen inside a button clickQGraphicsEllipseItem* testItem = new QGraphicsEllipseItem(20,30,120,70,0); m_pScene->addItem(testItem);
In that case, you would create an ellipse every time you pressed that button.
I don't quite understand the "I don't want to have the GraphicsView at the beginning of the program" - maybe you could elaborate on that.