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

Cannot remove window min/max buttons Ubuntu Wayland

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.4.2
    • QPA: Wayland
    • None
    • Linux/Wayland

    Description

      The code below removes the window minimize and maximize buttons and works on Windows 10 and Ubuntu X11, but not on Ubuntu Wayland:

      #include "widget.h"
      #include <QApplication>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          Widget w;
          w.resize(250, 150);
       
          // Remove minimize maximize button works on Windows 10 / Ubuntu X11, not Ubuntu Wayland:
          w.setWindowFlags(w.windowFlags() & Qt::CustomizeWindowHint);
          w.setWindowFlags(w.windowFlags() & ~Qt::WindowMinMaxButtonsHint);
      
          w.show();
          return a.exec();
      }

       

      Ubuntu Wayland not working:

       
      Ubuntu X11 works:

      Windows 10 works:

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.graphics.and.multimedia Qt Graphics Team
              erriez Erriez Ew
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes