QOpenGLWidget cpu usage is abnormal
-
I am using QOpenGLWidget and have inherited paintGL, but there is no operation within paintGL. Then, I am using a timer to call update.
class myWidget : public QOpenGLWidget { Q_OBJCET public: myWidget(); public slots: void call_update(); protect: void initializeGL() override; void paintGL() override; }void myWidget::paintGL() { // do nothing }; void myWidget::call_update() { update(); }myWidget w; QTimer* timer = new QTimer(nullptr); connect(timer, &QTimer::timeout, &w, &myWidget::call_update); //timer.start(16) // 10% cpu usage timer.start(17) // 0.5% cpu usagei know want to use vsync. so my timer need less then 16.6, but its cpu usage is abnormal