有时间的时候看看QT的examples 如果有啥需要的就写下来:
在大炮的例子中重绘大炮的时候update(rect())其中rect 这样得到感觉应该可以提高速度:
在大炮的例子中重绘大炮的时候update(rect())其中rect 这样得到感觉应该可以提高速度:
QRect CannonField::cannonRect() const
{
QRect result(0, 0, 50, 50);
result.moveBottomLeft(rect().bottomLeft());
return result;
}