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

Frameless QMessageBox for fullscreen application



  • Hi there.

    I have a PyQT5 application that is intended as a touchscreen operated webradio. The application would run as appliance and thus be the only application on that Raspberry Pi. To prevent users from moving or minimizing the application I simply turned off all the window frames.

    All of a sudden I realize that running QMessageBox with

    setWindowFlags(Qt.FramelessWindowHint | Qt.Dialog)
    

    is getting unstable. Sometimes the user can close the dialog box, sometimes he cannot. As the QMessageBox is modal it means the application is frozen. Removing that line (and running QMessageBox with a Frame) restores normal behaviour, but now there is a window title with minimize button on the screen.

    I have no clue what this may be related to and even consider this being a bug, but in which layer? There is Raspbian Buster, X, LXDE, Qt5, PyQt5 and my python application. My investigation so far is listed here:
    https://github.com/HiranChaudhuri/Webradio_v4/issues/28

    Any hints how I could get this fixed?

    Hiran


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    If you want to have a single application with window managements then why use a Window manager at all ?



  • @SGaist said in Frameless QMessageBox for fullscreen application:

    Hi and welcome to devnet,

    If you want to have a single application with window managements then why use a Window manager at all ?

    We do not always run the application exclusively - some users want to run it in parallel to other applications.
    For the Raspberry I believe running it as an applicance would be the main use case and I am playing around with configuration options (when I thought to have removed Openbox from the LXSession config file I was wondering that Openbox was still starting up - but that is another topic).

    What exactly prevents us from supporting both modes and the application tells the window manager (if present) about the desired decoration?


  • Lifetime Qt Champion

    The window manager is free to ignore whatever it wants to ignore. As the name suggests these flags are hints.

    One thing you should check is whether you can have a kiosk mode enabled so that you can have some sort of single application interface.


Log in to reply