Unsolved Qt5 QML App not visible when change the resolution ?
-
Yes, of course. Read the following document.
like this:
#include <QScreen> [...] QScreen *screen = QApplication::primaryScreen(); QObject::connect(screen, &QScreen::geometryChanged, [](const QRect &geometry){ qDebug() << geometry; }); [...]
-
@Devopia53 said in Qt5 QML App not visible when change the resolution ?:
QObject::connect(screen, &QScreen::geometryChanged, [](const QRect &geometry){ qDebug() << geometry; });
Hi, it is not helpful for me.
when I change the resolution, the screen (QApplication::primaryScreen()) is not changed....
-
@Alex_wang Do you mean the QScreen::geometryChanged signal is not emitted?
-
By the way, how are you changing the resolution ?
-
@SGaist
change the resolution by an app "drm_modeset":sudo ./drm_modeset -s 1920x1080@60
-
after changed the resolution, the surface or screen or window for qt5 app is still depending on last resolution.
the reason is on four floor -
See here and the
QT_QPA_EGLFS_ALWAYS_SET_MODE
environment variable. -
@SGaist
I have got it . It means I still have to relaunch the application. -
Do you have any other application running on your system ?
-
@SGaist
The decoded video is also rendered by DRM, which is running on my system. -
You have to give more details about your system and what it does.
-
@Alex_wang
Have you found a solution? I'm also having the same problem.