最近我正在为我的应用程序设计从右到左的布局(RTL)本地化支持,但似乎 LayoutMirroring.enabled:true 对窗口标题不起作用。这是我的演示代码如下:
import QtQuick 2.6
import QtQuick.Window 2.2
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1
Window {
visible: true
width: 640
height: 480
id:root
flags: Qt.Window
LayoutMirroring.enabled: true
LayoutMirroring.childrenInherit: true
Row {
// LayoutMirroring.enabled: true
// LayoutMirroring.childrenInherit: true
spacing: 20
LayoutMirroring.enabled: true
Repeater {
model: 5
Rectangle {
color: "red"
opacity: (5 - index) / 5
width: 70; height: 30
Text {
text: index + 1+" hello"
width:parent.width
}
}
}
}
Test{
id:t4
}
Component.onCompleted: {
t4.sohalDigVisible = true;
}
}