Hello, currently I try to figure out how to get the actual dimensions of a QGraphicsView.

I created a form with the designer on which a QGraphicsView ist placed. In the properties of the designer it reads 752x507 (width x height) under "geometry".

Getting the dimensions during runtime with code like this
Qt Code:
  1. Integer.toString(ui.graphicsView.geometry().height())
To copy to clipboard, switch view to plain text mode 
gives me 752x526.

But when I draw a rectangle on the related QGraphicsScene I can draw a figure with 747x502. This rectangle is shown exactly at the bordes of the QGraphicsView (without scrollbars etc.).

Can you explain to me, why this happens and how I can determine programmatically and reliably the dimensions of the QGraphicsView?

I'm a little bit confused that I'm not able to get dependable widths and heights...

Thanks in advance for your help!