Question

Greetings,

I'm trying to add a QGraphicsItem exactly in the center of the current screen.
My QGraphicsScene is very large (10k X 10K), so the QGraphicsView cannot show it entirely, there are scroll bars.

I can't find any function to return me the rectangle of my current screen, i searched in all QGraphicsScene and QGraphicsView functions.
There are functions to return the scene rect (it returns a rect 10k X 10k but it's useless) and there are functions to return the mouse position, but i need to move my mouse and click on a menu so the mouse will no longer be inside the scene and the item will be generated outside the visible space...

Thank you very much.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top