[英]Restore minimized frameless window in qml
我有一个默认的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
窗口仍然是无框架的,但是任务栏中有应用程序图标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.