使用Item元素的rotation属性进行修改。
显示效果如下。
?
代码如下:
import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.VirtualKeyboard 2.4
import QtQuick.Controls 2.3
import QtWebEngine 1.4
Item {
width: 800
height: 480
Item {
anchors.centerIn: parent
id: root
width: 480
height: 800
rotation: 270
Column {
anchors.fill: parent
Row {
width: parent.width
height: parent.height * 0.05
TextField {
width: parent.width - button_download.width
height: parent.height
}
Button {
id: button_download
width: parent.height
height: parent.height
text: qsTr("↓")
}
}
TabBar {
id: tabBar_select
width: parent.width
height: parent.height * 0.05
currentIndex: swipeView_select.currentIndex
Repeater {
model: ["推荐", "必备", "分类", "收藏夹"]
TabButton {
text: modelData
}
}
}
SwipeView {
id: swipeView_select
width: parent.width
height: parent.height * 0.85
currentIndex: tabBar_select.currentIndex
Repeater {
model: ["#ffdddd", "#ddffdd", "#ddddff", "#ffffff"]
Page {
background: Rectangle {
anchors.fill: parent
color: modelData
}
}
}
}
TabBar {
id: tabBar_main
width: parent.width
height: parent.height * 0.05
Repeater {
model: ["首页", "游戏", "榜单", "软件", "我的"]
TabButton {
text: modelData
}
}
}
}
}
}
|