vault backup: 2023-04-17 11:58:20
This commit is contained in:
24
.obsidian/workspace.json
vendored
24
.obsidian/workspace.json
vendored
@@ -34,9 +34,21 @@
|
|||||||
},
|
},
|
||||||
"pinned": true
|
"pinned": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "90e723ca7b21bf9e",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "markdown",
|
||||||
|
"state": {
|
||||||
|
"file": "04. Programming/QT/timer.md",
|
||||||
|
"mode": "source",
|
||||||
|
"source": true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"currentTab": 1
|
"currentTab": 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"direction": "vertical"
|
"direction": "vertical"
|
||||||
@@ -94,7 +106,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "00. Inbox/01. TODO.md",
|
"file": "04. Programming/QT/timer.md",
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@@ -119,7 +131,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outline",
|
"type": "outline",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "00. Inbox/01. TODO.md"
|
"file": "04. Programming/QT/timer.md"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -170,10 +182,11 @@
|
|||||||
"periodic-notes:Open today": false
|
"periodic-notes:Open today": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": "3b4577823cedf427",
|
"active": "90e723ca7b21bf9e",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"00. Inbox/想要的鏡頭.md",
|
|
||||||
"00. Inbox/01. TODO.md",
|
"00. Inbox/01. TODO.md",
|
||||||
|
"04. Programming/QT/timer.md",
|
||||||
|
"00. Inbox/想要的鏡頭.md",
|
||||||
"05. 資料收集/Capture One.md",
|
"05. 資料收集/Capture One.md",
|
||||||
"04. Programming/OpenCV API.md",
|
"04. Programming/OpenCV API.md",
|
||||||
"04. Programming/OpenCV.md",
|
"04. Programming/OpenCV.md",
|
||||||
@@ -201,7 +214,6 @@
|
|||||||
"02. 工作/01. Logitech/00. OurTeam.md",
|
"02. 工作/01. Logitech/00. OurTeam.md",
|
||||||
"05. 資料收集/軟體工具/git/tag.md",
|
"05. 資料收集/軟體工具/git/tag.md",
|
||||||
"04. Programming/Kotlin/AtomicBoolean.md",
|
"04. Programming/Kotlin/AtomicBoolean.md",
|
||||||
"03. 專注Study/Android/Android programming.md",
|
|
||||||
"attachments/android_mediacodec_life_cycle.png",
|
"attachments/android_mediacodec_life_cycle.png",
|
||||||
"attachments/android_mediacodec_flow.png",
|
"attachments/android_mediacodec_flow.png",
|
||||||
"attachments/Pasted image 20230308105856.png",
|
"attachments/Pasted image 20230308105856.png",
|
||||||
|
|||||||
19
04. Programming/QT/timer.md
Normal file
19
04. Programming/QT/timer.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
使用QTimer來反覆執行工作。
|
||||||
|
QTimer可以單次執行,也可以多次執行。
|
||||||
|
|
||||||
|
使用概念如下:
|
||||||
|
1. 建立 QTimer 物件,例如叫做 timer。
|
||||||
|
2. 連接QTimer的timeout signal到你的反應 function
|
||||||
|
3. 呼叫 timer->start()
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```cpp
|
||||||
|
QTimer* timer = new QTimer(this);
|
||||||
|
connect(timer, SIGNAL(timeout()), this, SLOT(update()));
|
||||||
|
timer->start(1000);
|
||||||
|
```
|
||||||
|
|
||||||
|
QTimer可以單次執行:
|
||||||
|
```cpp
|
||||||
|
QTimer::singleShot(200, this, SLOT(update());
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user