qmltest/qml/main.qml

36 lines
808 B
QML
Raw Normal View History

2019-09-18 19:38:51 +00:00
import QtGraphicalEffects 1.0
import QtQuick 2.7
import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.3
import QtQuick.Window 2.11
import QtQuick.Controls.Styles 1.4
import QtQuick.Controls 1.4
ApplicationWindow {
id: windowItem
width: 1200
height: 800
visible: true
title: "qmltest"
style: ApplicationWindowStyle {
background: Rectangle { color: "#FFFFFF"; anchors.fill: parent; }
}
function ptToPx(pt) {
return Screen.pixelDensity * 25.4 * pt / 72
}
function pxToPt(px) {
return px * 72 / (Screen.pixelDensity * 25.4)
}
ColumnLayout {
2019-09-18 19:49:04 +00:00
Text { text: "Screen.pixelDensity: " + Screen.pixelDensity }
2019-09-18 19:38:51 +00:00
TestRow { base: 10 }
TestRow { base: 16 }
TestRow { base: 24 }
TestRow { base: 36 }
TestRow { base: 48 }
}
}