Error said no definition, can not find a file, don't know what to do, teach me how to change, thank you,

CodePudding user response:
PaintEvent is the virtual functions QWidget,
If you want to write to your widget class paintEvent method,
Code should be such,
Void Widget: : paintEvent (QPaintEvent *)
{
QPainter p=(this);
Conviction yourself rawPixmap (0, 0, QPixmap (" :/resource/img. PNG "));
}
Rather than
Void QWidget: : paintEvent (QPaintEvent *)
{
QPainter p=(this);
Conviction yourself rawPixmap (0, 0, QPixmap (" :/resource/img. PNG "));
}
CodePudding user response: