Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Clicking Show Details... moves QMessageBox to top left corner



  • We are running application with very limited window manager controlled by Open Box. When I show QMessageBox it is shown centered on top of parent (expected behavior). But as soon Show Details button is clicked message box jumps to top left corner of the screen.

    It seems like a bug, but when the same application is ran under standard Ubuntu, it stays centered. Any idea what is wrong?

    Best regards,
    Alex


  • Lifetime Qt Champion

    @AlexMal said in Clicking Show Details... moves QMessageBox to top left corner:

    Any idea what is wrong?

    Ask the window manager devs I would say - I already found some bugs in openbox when using multi-monitor setup (e.g. a borderless dialog in a borderless dialog is shown on the top left screen, no matter where the parent is in a 2x2 monitor setup).
    Create a small testcase, ask the devs to take a look on it so it may get fixed.



  • It is related to how open-box treats borderless dialogs,
    I've found similar problem when message box is shown then hidden: if in QDialog::showEvent skips position adjustment:

    if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme())
        if (theme->themeHint(QPlatformTheme::WindowAutoPlacement).toBool())
            return;
    

    As far as I understand Qt supposed to provide way to control this behavior. But I can't find nothing useful in documentation besides that QPlatformTheme was added.

    Also when detailed button is clicked sometimes it seems appears properly, sometimes not, the difference seems caused by the focus.

    I guess I have to try to contact window manager devs.


Log in to reply