因為使用場景問題,我的界面 需要旋轉90度使用,但在加入Combox后發現彈出的界面沒有同步旋轉,如下圖:


原始碼如下:
import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.5
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
Rectangle{
anchors.fill: parent
rotation: 90
GroupBox{
width: 240
height: 120
anchors.centerIn: parent
title: qsTr("Sensor Number")
ComboBox{
anchors.fill:parent
editable: false
model: ["1","2","3","4","5","6","7","8","9","10","11","12",]
}
}
}
}
該如何實作讓第二張圖片也旋轉90度
uj5u.com熱心網友回復:
進來學技術的轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/269732.html
標籤:Qt
