Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.1
-
None
Description
//demo #include <QApplication> #include <QDebug> #include <QTimer> #include <QScreen> int main(int argc,char* argv[]) { if (!qgetenv("QT_SCREEN_SCALE_FACTORS").isEmpty()) { qDebug() << qgetenv("QT_SCREEN_SCALE_FACTORS"); qunsetenv("QT_SCREEN_SCALE_FACTORS"); } QApplication a(argc,argv); QTimer t; t.connect(&t,&QTimer::timeout,[](){ auto screen = qApp->primaryScreen(); auto orientation = screen->primaryOrientation(); qDebug() << "primaryOrientation" << orientation; }); t.start(500); return a.exec(); }
Run this code,and use "xrandr -o left" to rotate screen.
the output is always "LandscapeOrientation", and the expected results should be changed to "PortraitOrientation".