vault backup: 2024-01-01 17:19:42

This commit is contained in:
2024-01-01 17:19:42 +08:00
parent 0b2e0f0df9
commit 8aedf525b5
439 changed files with 39 additions and 39 deletions

View 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());
```