Unable to paint on Qt Widget, shows error “paintEngine: Should no longer be called”
问题 I have created a widget using Qt Creator such a way that it has two sub windows inside a main window and some push buttons to load, save images, set pen width and color to paint on the window. But when i start to paint it gives me error saying QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::setPen: Painter not active QPainter::drawPoints: Painter not active Does anyone know what mistake i am doing, i checked threads