2024-09-12 07:05 AM
Hi,
I am successfully able to cross-compile a Qt application and run it on a STM32MP157F-DK2 using the various tutorials on this site.
Problem is, I want to view the application using the internal LCD of the board (800*480), but the application is designed for a 1920*1080 screen.
It runs, but only half of the window is visible. I tried to run it on Weston and EGLFS, same result.
Is it possible to zoom out/rescale the application using some Weston/EGLFS parameters, so that the whole window is visible? I am aware that the contents are gonna be tiny, that's not a problem.
I tried QT_SCALE_FACTOR=0.5 using EGLFS, but that didn't work.
2024-09-12 07:17 AM
In your main application code, you can set the window size explicitly to match the display resolution:
QWidget *window = new QWidget;
window->resize(800, 480);
window->show();
2024-09-12 07:30 AM
This resizes the size of the window, but not the contents there (bitmaps in my case, using QLabels).
2024-09-27 02:51 AM
Hello @SomeForumUsername
you cannot use some external environment parameters to resize your application. You need to do it inside the application code.
If the application has been well designed (layout, image to fit, ...), this should be quite easy to migrate it to a lower resolution.
As a first trial, you can adjust the main window size (width/height) and check what you got.
Philippe.