Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2979

Title bar appears when minimizing WA_TranslucentBackground & FramelessWindowHint with QWebEngineView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.8.0.2
    • PySide
    • None
    • Windows

    Description

      Title bar appears when minimizing WA_TranslucentBackground & FramelessWindowHint with QWebEngineView

      Here is a sample program that reproduces the behavior: 

      import sys
      from PySide6.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget, QPushButton
      from PySide6.QtWebEngineWidgets import QWebEngineView
      from PySide6.QtCore import Qt
      
      class MainWindow(QMainWindow):
          def __init__(self):
              super().__init__()
              self.setWindowTitle("Title Bar Bug")
              self.setGeometry(100, 100, 800, 600)
      
              # Set translucent background and frameless window
              self.setAttribute(Qt.WA_TranslucentBackground)
              self.setWindowFlags(Qt.FramelessWindowHint)
      
              # Main layout
              central_widget = QWidget()
              main_layout = QVBoxLayout()
              central_widget.setLayout(main_layout)
              self.setCentralWidget(central_widget)
      
              # Minimize button
              minimize_button = QPushButton("Minimize")
              minimize_button.clicked.connect(self.showMinimized)
      
              # QWebEngineView setup
              self.web_view = QWebEngineView()
              self.web_view.setHtml("<h1 style='color: white; text-align: center;'>Hello, World!</h1>")
      
              # Add widgets to layout
              main_layout.addWidget(minimize_button)
              main_layout.addWidget(self.web_view)
      
      if __name__ == "__main__":
          app = QApplication(sys.argv)
          window = MainWindow()
          window.show()
          sys.exit(app.exec())
      

      Attachments

        1. pyside2979.py
          1 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            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