C++ 在qml中还原最小化的无框窗口

C++ 在qml中还原最小化的无框窗口,c++,qt,qml,C++,Qt,Qml,我有一个默认的main.cpp文件,并在qml文件中编写了一些代码。大概是这样的: ApplicationWindow { id: mainWindow width: 640 height: 480 color: "white" visible: true flags: Qt.FramelessWindowHint Rectangle { id: minimizeButton width: 32 hei

我有一个默认的main.cpp文件,并在qml文件中编写了一些代码。大概是这样的:

ApplicationWindow {
id: mainWindow

width: 640
height: 480
color: "white"

visible: true

flags: Qt.FramelessWindowHint

      Rectangle {
            id: minimizeButton

            width: 32
            height: 32

            Rectangle {
                anchors {
                    bottom: parent.bottom
                    left: parent.left
                    right: parent.right
                }

                color: "grey"

                height: 2

                scale: mouse.pressed ? 0.8 : 1.0
                smooth: mouse.pressed
            }

            MouseArea {
                id: mouse
                anchors.fill: parent

                hoverEnabled: true

                onClicked: mainWindow.showMinimized()
            }
        }
}

所以,我的问题是:我最小化窗口后如何恢复它?因为Windows中的控制面板上没有程序。

这在我的计算机上正常工作:

flags: Qt.FramelessWindowHint |
       Qt.WindowMinimizeButtonHint |
       Qt.Window

窗口仍然是无框的,但任务栏中有应用程序图标。

首先:我有一个无框窗口;第二:我最小化了窗口,而不是调整它的大小。或者我就是不明白你的意思。什么地区?