Results 1 to 2 of 2

Thread: QDialog Appearing in Random Positions on Weston Wayland

  1. #1
    Join Date
    Apr 2021
    Posts
    4
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default 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
    Qt Code:
    1. pos();
    To copy to clipboard, switch view to plain text mode 
    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

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default 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.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. bitbake failed on ERROR: Nothing RPROVIDES 'weston-examples'
    By bayoupan in forum Installation and Deployment
    Replies: 0
    Last Post: 20th June 2018, 16:29
  2. Choosing startup screen in Weston + Wayland
    By Prisco in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 26th February 2018, 08:46
  3. Replies: 0
    Last Post: 30th April 2013, 17:32
  4. Replies: 1
    Last Post: 7th April 2010, 16:26
  5. QGroupBox appearing in random colors (Qt 3.3)
    By jgver in forum Qt Programming
    Replies: 0
    Last Post: 11th February 2009, 21:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.