C++ (Qt)QPainter painter( this );
C++ (Qt)void QWidget::update ( const QRect & rect )
void MyWidget::paintEvent(QPaintEvent *e){ QPainter p; p.begin(this); p.setPen(Qt::blue); p.drawLine(0, 5, 1000, 1000); p.end();}