【发布时间】:2020-05-15 21:06:21
【问题描述】:
我有一个针对 iOS 和 Android 的 QML 应用程序。在 iOS 中运行时 - 我正在尝试(最好)更改显示在应用程序窗口下方的黑条的颜色(如下面屏幕截图中的红色框所示),使其与其上方的页面切换器的颜色相匹配使页面切换器显示在屏幕底部连续,或者如果无法完全删除它并在那里添加我自己的间距元素。这个黑色空间似乎只出现在带有 homebar 指示器的手机上。
我已尝试按照iOS 9 Xcode 7 - Application appears with black bars on top and bottom 中的建议添加启动屏幕故事板。这似乎没有任何区别。
我还尝试将我的根 Window 元素设置为具有visibility: Window.FullScreen 的属性。这确实删除了屏幕底部的黑色空间,但也隐藏了顶部的 iOS 状态栏,我不想这样做。
Window {
id: root
visible: true
width: 450
height: 800
color: "black"
Page {
id: mainPageId
anchors.fill: parent
header: /* ... header ... */
footer: TabBar {
id: tabBarid
width: parent.width
contentHeight: 80
background: Rectangle {
color: "lightgray"
}
TabButton {
/* ... tab button stuff ... */
}
TabButton {
/* ... tab button ... */
}
}
SwipeView {
id: mainPageSwipeViewId
anchors.fill: parent
/* ... swipe to hold the main content of the page ... */
}
}
}
如何删除屏幕底部的这个空间,或者(最好)改变它的颜色以匹配我的页面切换器的颜色,以便页面切换器显示在屏幕底部连续?
Qt 版本: 5.13
XCode 版本: 11.4 (11E146)
iOS 版本: 13.4.1
【问题讨论】: