//! [0] Q3PaintDeviceMetrics pdm(myWidget); double aspect = (double)pdm.widthMM() / (double)pdm.heightMM(); //! [0]