Qt: QWidget::paintEngine: Should no longer be called
问题 I'm trying to make an app where you can draw with your finger on a canvas. To achieve this, I'm subclassing QWidget as MFCanvas , registered the class in QML with qmlRegisterType<>() , implementing the virtual paintEvent(); function, and drawing on it with a QPainter inside the paintEvent(); function. The Problem: Upon construction, the QPainter throws this warning: QWidget::paintEngine: Should no longer be called Then, serveral other related warnings are thrown: QPainter::begin: Paint device