cpu 控件源代码(可直接运行)
custom_cpu_widget::custom_cpu_widget(QWidget *parent) : QWidget(parent) { this->w_width = 80; this->w_height = 100; resize(QSize(this->w_width, this->w_height)); setFixedSize(this->w_width, this->w_height); this->cpu_used_level = 10; } // [public start] void custom_cpu_widget::cpu_set_ widget_level(int level) { this->cpu_used_level = level; this->repaint(); } widget_level(int level) { this->cpu_used_level = level; this->repaint(); }
用户评论