QPainter:Internal error; no available GC
QPainter *painter->drawRect(0,0,painter->viewport().width(),painter->viewport().height());
C++ (Qt)QPainter painter(this);painter.drawRect(0,0,some_width,some_height);
void Diagram::paintEvent(QPaintEvent *e){QPainter *painter = new QPainter(this);painter->setViewport(0,0,size().width(),size().height());...}
painter->drawRect(0,0,painter->viewport().width(),painter->viewport().height());
painter->viewport()
C++ (Qt)void Diagram::paintEvent(QPaintEvent *e){QPainter painter(this);...}
class Diagram:public QWidget{...public: QPainter *painter;}void Diagram::paintEvent(QPaintEvent *e){...painter = new QPainter(this);...}
void Diagram::paintEvent(QPaintEvent *e){QPainter *painter = new QPainter(this);...}
C++ (Qt)class Diagram:public QWidget{...public: QPainter painter;} void Diagram::paintEvent(QPaintEvent *e){...painter.begin(this);... ...painter.end();... }