lovexin109 |
2017-09-25 16:51 |
QUICK 内width,height是什么单位?
- ApplicationWindow {
id:mainwindow visible: true width: 1080 height: 1740 title: qsTr("Hello World")
Rectangle { id: mainrec anchors.fill: parent
Label { id:label1 text:parent.width anchors.centerIn: parent } Label{ id:label2 text:parent.height anchors.top: label1.bottom anchors.verticalCenter: parent.verticalCenter }
}
}
代码如上: 手机1080X1920,运行结果是360X616,(去掉手机最上面那一栏高度刚好是1848)基本上是3的系数,想问下width和height的单位是什么,为什么会得出360和616?难道是dp??
|
|