Quote Originally Posted by qlands View Post
Hi,

I used m_scene->setSceneRect(-180, -90, 360, 180) in union with graphicsView->scale(1, -1); and the coordinate system is fine. However if I maximize the windows the qGraphisView covers almost all screen and the coordinates at the extreme of the graphicsView are outside -180 <----> 180 horizontally and outside -90 <------> 90 vertically. How can I make the QGraphicsScene or the qGraphisView to always keep the extremes in -180 to 180 and 90 to -90? Something like if I maximize the windows not increase the boundaries but zoom into the boundaries.

Thanks for your help.
Reimplement resizeEvent for the view and call QGraphicsView::fitInView() passing the rect you want matched in the view.