diff options
Diffstat (limited to 'app/CameraControl.qml')
-rw-r--r-- | app/CameraControl.qml | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/CameraControl.qml b/app/CameraControl.qml index f3407d5..4e0b94d 100644 --- a/app/CameraControl.qml +++ b/app/CameraControl.qml @@ -27,6 +27,7 @@ RowLayout { property var models: [number, fps, resolution]
property real back: 1
property bool switchstatus: true
+ property bool switchChecked: false
Repeater {
id: info
@@ -112,6 +113,7 @@ RowLayout { Switch {
id: cameraswitch
enabled: switchstatus
+ checked: switchChecked
onCheckedChanged: {
if (checked && device){
device.start(info.itemAt(0).children[1].currentText, info.itemAt(1).children[1].currentText, info.itemAt(2).children[1].currentText)
@@ -121,11 +123,6 @@ RowLayout { }
}
- onVisibleChanged: {
- if (!visible)
- cameraswitch.checked = false
- }
-
Component.onCompleted: {
device.enumerateCameras();
number = device.camranum();
|