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
Answer: After calling MainWindow::show(), then get the size.
Description: I had the same problem as Pieter. In the widget constructor like MainWindow::MainWindow() you can't get the correct size of the widget like QGraphicsView in Grid Layout because in that constructor the widget's size and location are not determined. Therefore, in MainWindow::MainWindow() you have to call show() and then get the size of the view or other widget.