aboutsummaryrefslogtreecommitdiffstats
path: root/app/CameraControl.qml
diff options
context:
space:
mode:
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-02 13:52:53 +0900
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>2018-11-02 13:52:53 +0900
commitca756b3f04bb2cb89e0f1f19e197dfa6a809be8d (patch)
treef918b52d44a69060aee41aefa77e6659d2213822 /app/CameraControl.qml
parenta35b3631420ac051a1b50a00806ee29900f03250 (diff)
add camapp source
Diffstat (limited to 'app/CameraControl.qml')
-rw-r--r--app/CameraControl.qml7
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();