arm上qt画图,如何降低cpu占用?
程序中创建了一个绘图区域 class PaintArea:public QWidget
绘图时
void PaintArea::paintEvent(QPaintEvent *)//重画函数
{
//新建一个QPainter对象
QPainter p(this);
//以下根据数据操作p进行绘图
}
因为一直在变动,调用repaint()让其每秒重画一次.
使用top命令看系统状况
程序一直占用40%-98%左右,线多>10根足有的情况cpu会90%以上,导致界面其他显示状况会卡住。
我的板子用的是at91sam9261,主频在200Mhz
请问如何绘图能降低CPU占用呢?