Something in the lines of:

Qt Code:
  1. QPixmap myPixmap(100, 100); // size
  2. QPainter painter(&myPixmap);
  3.  
  4. // Use the painter to draw things
  5.  
  6. // Then use the pixmap like:
  7. myLabel->setPixmap(myPixmap);
To copy to clipboard, switch view to plain text mode