3D view now shows lights and added double spinbox

This commit is contained in:
2023-02-22 01:25:32 +01:00
parent a0b77ead41
commit 58c65c73f2
9 changed files with 113 additions and 526 deletions
+22 -10
View File
@@ -7,15 +7,15 @@ GridLayout {
property vector3d value
onValueChanged: {
xBox.value = value.x
yBox.value = value.y
zBox.value = value.z
xBox.realValue = value.x
yBox.realValue = value.y
zBox.realValue = value.z
}
signal valueModified
function updateValue() {
const newValue = Qt.vector3d(xBox.value, yBox.value, zBox.value);
const newValue = Qt.vector3d(xBox.realValue, yBox.realValue, zBox.realValue);
console.log(newValue);
if (newValue === value)
return;
@@ -27,26 +27,38 @@ GridLayout {
text: qsTr('x:')
}
SpinBox {
DoubleSpinBox {
id: xBox
onValueModified: updateValue()
editable: true
realFrom: -1000
realTo: 1000
//stepSize: 0.01
onRealValueModified: updateValue()
}
Label {
text: qsTr('y:')
}
SpinBox {
DoubleSpinBox {
id: yBox
onValueModified: updateValue()
editable: true
realFrom: -1000
realTo: 1000
//stepSize: 0.01
onRealValueModified: updateValue()
}
Label {
text: qsTr('z:')
}
SpinBox {
DoubleSpinBox {
id: zBox
onValueModified: updateValue()
editable: true
realFrom: -1000
realTo: 1000
//stepSize: 0.01
onRealValueModified: updateValue()
}
}