How to use QPainter on QPixmap
问题 I'm a newbie to Qt/Embedded. I want to use QPainter to draw stuff on a QPixmap , which will be added to QGraphicsScene . Here is my code. But it does not show the drawings on the pixmap. It shows only the black pixmap. int main(int argc, char **argv) { QApplication a(argc, argv); QMainWindow *win1 = new QMainWindow(); win1->resize(500,500); win1->show(); QGraphicsScene *scene = new QGraphicsScene(win1); QGraphicsView view(scene, win1); view.show(); view.resize(500,500); QPixmap *pix = new