Getting the size of a QGraphicsView

后端 未结 5 2021
眼角桃花
眼角桃花 2021-01-20 14:07

I want to know the size of a certain QGraphicsView. Its size isn\'t fixed because the widget is part of a grid layout. I tried using this->ui->myGra

5条回答
  •  忘掉有多难
    2021-01-20 14:35

    If you wanna know the actual size of QGraphicsView, QGraphicsView::size(); If you wanna konw only the content size of QGraphicsView, QGraphisView::viewport().size();

提交回复
热议问题