摘要:
1.坐标系简介Qt中每一个窗口都有自己的一个坐标系,默认窗口左上角为坐标原点(0,0),然后水平向右依次增大(X轴),垂直向下依次增大(Y轴)。例如:void MyDraw::paintEvent( QPaintEvent * ){QPainterpaint( this ); paint.setBrush(Qt::green ); paint.drawRect(0, 0, 100, 100 ); paint.setBrush(Qt::red ); paint.drawRect(-50, -50, 100, 100 );}上例中,先在原点(0,0)绘制了一个长、宽都是100像素的... 阅读全文