Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

& lt;Qt changing speed is realized by the variable speed timer

Shulou Source: shulou.com Published: 2022-06-03 05:54:04 11月23日 Update

/ / Dialog.h

Private:QTimer * timer

/ / Dialog.cpp

/ / timer = new QTimer (this) in the constructor; connect (timer, SIGNAL (timeout ()), this, SLOT (update (); updatetime (); / / external void Dialog::updatetime () {if (speed==1) timer- > stop (); else timer- > start (300-speed*10);}

After that, the functions in SLOT can change the speed.

Tags: Function Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL NVidia Microsoft macOS vpn