I am attempting to build my own QT5 application for the SAMA5D27-SOM1-EK board using the QT Yocto build provided from Microchip.

When I build my own application in QT5, I find that each time I launch it the QT window seems to have a random position. I understand that the BSP is using the wayland compositor and weston in order to actually draw to the screen and QT is using this protocol. Maybe it's something involving this but looking at the Microchip example app source code (for the application launcher) I see that the apps are setting fullscreen instead of a fixed size or position. Maybe it has something to do with this. In my app however I am explicitly setting the window size and position (and need to) within QT. This works fine when running on my desktop (defined position and size). When I load it on the board however, it looks like the size is correct but the position varies with each launch.

It will depend on the app type, but if we consider creating a new QT widgets application with main window (File -> New File or Project -> Application -> Qt Widgets Application), the following statements could be added in main to set a fixed size window at a fixed position:

MainWindow w;
// Set main window to a fixed side of 100x100 and move it to position 0, 0
w.setFixedSize(100, 100);
w.move(0,0);

When launching the app on the board, this does not work. The window will be a fixed size, however it will take a random position each time. If I make a QML based application (which will involve different statements), same problem.

The major difference I see between my app and the Microchip demo applications is that those are all set to full screen mode. If I set my app to full screen, it will lock to full screen. However, I don't want to do this in my case - I want to be able to position a smaller fixed size window at a fixed position.

This is using the QT5 demo image Yocto build for the SAMA5D27-SOM1-EK with QT5 community addition configured using the build environment also created by Yocto.