From f91f8e8b92ec7e0b971ab64d83ddd6b8d4cdb604 Mon Sep 17 00:00:00 2001 From: kelteseth Date: Tue, 6 Nov 2018 17:00:21 +0100 Subject: [PATCH] Fix example --- ScreenPlaySysInfo/cpu.cpp | 2 +- ScreenPlaySysInfo/cpu.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ScreenPlaySysInfo/cpu.cpp b/ScreenPlaySysInfo/cpu.cpp index 072fae8a..9cb13626 100644 --- a/ScreenPlaySysInfo/cpu.cpp +++ b/ScreenPlaySysInfo/cpu.cpp @@ -7,9 +7,9 @@ CPU::CPU(QObject *parent) : QObject(parent) { - m_updateTimer.start(m_updateTimer); // signal obj, signal function pointer, slot obj, slot function pointer connect(&m_updateTimer,&QTimer::timeout,this,&CPU::update); + m_updateTimer.start(m_tickRate); } diff --git a/ScreenPlaySysInfo/cpu.h b/ScreenPlaySysInfo/cpu.h index 82699a17..8484e43a 100644 --- a/ScreenPlaySysInfo/cpu.h +++ b/ScreenPlaySysInfo/cpu.h @@ -73,5 +73,6 @@ private: static int c_NumOfProcessors; static ULONG c_BufferSize; - int m_tickRate; + int m_tickRate = 500; + QTimer m_updateTimer; };