(double)widget->width() / widget->widthMM(); // QWidget* widget = ...(double)widget->height() / widget->heightMM();