#include <QScreen>
qreal x,y,dpi;
dpi = QGuiApplication::screens().at(0)->physicalDotsPerInch();
x = QGuiApplication::screens().at(0)->physicalDotsPerInchX();
y = QGuiApplication::screens().at(0)->physicalDotsPerInchY();
QSizeF rec = QGuiApplication::screens().at(0)->physicalSize();
qreal rec_w = rec.width();
qreal rec_h = rec.height();
printf("screen physicalDotsPerInch:%f\n", (float)dpi);
printf("screen physicalDotsPerInchX:%f\n", (float)x);
printf("screen physicalDotsPerInchY:%f\n", (float)y);
printf("screen physicalSize w:%f h:%f\n", (float)rec_w, (float)rec_h);
QT5 配置mmsize
QT_QPA_PLATFORM="linuxfb:fb=/dev/fb1:mmsize=24x24"