CodePudding user response:
Maybe all you need is the scale in the QGraphicsView...CodePudding user response:
Int minScaleFactorLen=qMin (this - & gt; Width (), and this - & gt; Height ()); Painter. Scale (minScaleFactorLen/actualLen, minScaleFactorLen/actualWidth); ActualLen and actual width is the actual pixel width of the length of your current system