我有一个默认的 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
窗口仍然是无框的,但任务栏中有应用程序图标。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)