对Qt中双缓冲绘图的理解
原教程 :http://bbs.qter.org/forum.php?mod=viewthread&tid=120&extra=page%3D1%26filter%3Dauthor%26orderby%3Ddateline%26orderby%3Ddateline
教程中的代码:
void Dialog::paintEvent(QPaintEvent *)
{
int x,y,w,h;
y = lastPoint.y();
x = lastPoint.x();
h = endPoint.y() - y;
w = endPoint.x() - x;
if(isDrawing) //如果正在绘图,就在辅助画布上绘制
QPainter painter(this);
{
<