Today's Question:  What are you most afraid of as a programmer?        GIVE A SHOUT



  Save QWidget as image

Qt library is an excellent GUI library for C++ programmers developed by Nokia and now is an open source project. Often, we may use QPainter to draw strings, lines or images on a QWidget. We can override the QWidget's paintEvent() method when we want to use QPianter object to draw something on a QWidget. If we want to save the items drawn on QWidget as image for later reference, what can we do? We can save a QWidget as an image. Here is the code for achieving this: QPixmap pixmap(this->size())...

9,384 0 0          C++ IMAGE QT QWIDGET