更新时间:2021-11-29 01:21:50
这里是我使用的:
// in the main window
property bool desktop: {
switch (Qt.platform.os) {
case "android":
case "ios":
case "winphone":
case "winrt":
return false
default: return true
}
}
visibility: desktop ? Window.AutomaticVisibility : Window.Maximized
关于强制横向移动,将以下内容添加到清单->应用程序->活动属性部分中的项目文件夹/android中的AndroidManifest.xml
文件(不是构建目录中的文件):
As for forcing landscape orientation, add the following to the AndroidManifest.xml
file in your project folder / android (not the one in the build directory) in the manifest -> application -> activity properties section:
android:screenOrientation="landscape"