Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69318

WASM: setting widget app fullscreen but still draggable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.11
    • QPA
    • None
    • WebAssembly
    • 9c72ae61aa

    Description

      Simple repro:

      #include <QApplication>
      #include <QPushButton>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QPushButton b{"hello world"};
          b.showFullScreen();
      
          return a.exec();
      }
      

      Shows up as this, and the window can be dragged:

       

       

      If I change the code into :

      #include <QApplication>
      #include <QPushButton>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QPushButton b{"hello world"};
          b.showFullScreen();
          b.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
      
          return a.exec();
      }

      Nothing at all is shown, only the dark grey background of the fake compositor. Same with just

      b.setWindowFlags(Qt::FramelessWindowHint);

       

      Edit: it was a problem of order, calling setWindowFlags before showFullScreen does the trick. On desktop linux it works if put after though.

      Attachments

        1. screen.png
          5 kB
          Jean-Michaël Celerier
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lpotter Lorn Potter
            jcelerier Jean-Michaël Celerier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes