1. qml显示全屏
2022-07-30 本文已影响0人
lushao
import QtQuick 2.12
import QtQuick.Window 2.12
Window {
visible: true
y:10
width: fullScreen ? 640 : Screen.desktopAvailableWidth
height: fullScreen ? 480 : Screen.desktopAvailableHeight
title: qsTr("Hello World")
property bool fullScreen: true
flags: fullScreen ? Qt.Window : Qt.FramelessWindowHint
MouseArea{
anchors.fill: parent
onClicked: {
fullScreen = !fullScreen
}
}
}