Get visible rectangle of QGraphicsView?

前端 未结 6 1450
借酒劲吻你
借酒劲吻你 2020-12-15 22:04

I\'ve been pulling my hair out with this one for hours. There\'s a thread here about it, but nothing seems to be working. QGraphicsView::rect() will return the width and hei

6条回答
  •  感情败类
    2020-12-15 22:30

    It sounds like what you want is the scene rectangle. The ::rect() method is inherited from QWidget. See:

    http://doc.qt.io/qt-5/qgraphicsview.html#sceneRect-prop

提交回复
热议问题