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

Title bar appears when minimizing WA_TranslucentBackground & FramelessWindowHint with QWebEngineView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.10
    • 6.8.1
    • WebEngine
    • None
    • Windows
    • ee942d7ab40e1d29008695ad1406d25d25780d28

    Description

      Title bar appears when minimizing WA_TranslucentBackground & FramelessWindowHint with QWebEngineView

      Here is a sample program that reproduces the behavior as well as an attached video showing the issue:

       

      #include <QApplication>
      #include <QMainWindow>
      #include <QVBoxLayout>
      #include <QWidget>
      #include <QPushButton>
      #include <QWebEngineView>
      #include <QScreen>
      
      class MainWindow : public QMainWindow {    
          Q_OBJECT
      
      public:
          MainWindow(QWidget *parent = nullptr) : QMainWindow(parent) {        
              // Set translucent background and frameless window
              setAttribute(Qt::WA_TranslucentBackground);
              setWindowFlags(Qt::FramelessWindowHint);
      
              // Central widget and layout
              QWidget *centralWidget = new QWidget(this);
              QVBoxLayout *layout = new QVBoxLayout(centralWidget);
              setCentralWidget(centralWidget);
      
              // Minimize button
              QPushButton *minimizeButton = new QPushButton("Minimize", this);
              connect(minimizeButton, &QPushButton::clicked, this, &MainWindow::showMinimized);
      
              // QWebEngineView setup
              QWebEngineView *webView = new QWebEngineView(this);
              webView->setHtml("<h1 style='color: white; text-align: center;'>Hello, World!</h1>");
      
              // Add widgets to layout
              layout->addWidget(minimizeButton);
              layout->addWidget(webView);
          }
      };
      
      int main(int argc, char *argv[]) {
          QApplication app(argc, argv);
      
          MainWindow window;
          window.setGeometry(100, 100, 800, 600);
          window.show();
      
          return app.exec();
      }

       

       

      Attachments

        Issue Links

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

          Activity

            People

              qt_webengine_team Qt WebEngine Team
              jivefungus Jive Fungus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes