QDialog Appearing in Random Positions on Weston Wayland
Hello,
I am running a Qt C++ Widgets application (5.15.1) on a Linux SBC running Wayland Weston.
Everytime I open a dialog (QFileDialog, QMessageBox etc) it appears in a random location on the display.
Querying the position of the dialog via gives the same co-ordinates even though it is clearly not the same position.
Any suggestions or ways to force dialogs to appear in the centre of the screen (as Qt docs say it should do!)
Henry
Re: QDialog Appearing in Random Positions on Weston Wayland
When you create the QDialog, do you give it the main widget of your application as the parent in the constructor, or do you create it with a null parent? If you want it to be centered on your application, you should give it a valid parent, usually the main application widget.