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

QML: "Title bar" artifact when using Window.showMinimized()

    XMLWordPrintable

Details

    • Windows

    Description

       

      For some reason, when I minimize the window using the "minimize" button and open it back, a semi-transparent "title bar" appears. I will attach two screenshots below, before and after clicking the button:

      Codes what I'm using:
      main.qml:

      import QtQuick
      import QtQuick.Window
      
      Window {
          id: technical_window
          flags: Qt.Window | Qt.FramelessWindowHint | Qt.CustomizeWindowHint
      
          visible: true
          width: 640
          height: 480
      
          title: "window"
      
          color: "transparent"
      
          Rectangle {
              anchors.fill: parent
              color: "transparent"
              border.color: "red"
              border.width: 1
          }
      
          Rectangle {
              width: 100
              height: 100
              color: "green"
              anchors.centerIn: parent
      
              Text {
                  text: "minimize"
                  anchors.centerIn: parent
              }
      
              MouseArea {
                  anchors.fill: parent
      
                  onPressed: {
                      technical_window.showMinimized()
                  }
              }
          }
      }
      

      main.py:

      import sys
      
      from PySide6.QtCore import QUrl
      from PySide6.QtGui import QGuiApplication
      from PySide6.QtQml import QQmlApplicationEngine
      from PySide6.QtQuickControls2 import QQuickStyle
      
      if __name__ == "__main__":
          app = QGuiApplication(sys.argv)
          QQuickStyle.setStyle("Basic")
          engine = QQmlApplicationEngine()
          engine.load(QUrl("main.qml"))
      
          if not engine.rootObjects():
              sys.exit(-1)
      
          sys.exit(app.exec())
       

       

      Attachments

        Issue Links

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

          Activity

            People

              morteza.jamshidi Morteza Jamshidi
              necko1 Neckol Mushcenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes