Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- QWidget



  QScrollArea Scrollbar Display Solution

Qt framework is a popular C++ GUI framework developed by Nokia. And it is also cross platform compatible. Many developers are using Qt to develop C++ GUI programs. In Qt, some important components are deserved our close attention. Many developers faced the problem when they put some widgets in a QScrollArea widget and they want it to display scroll bars when the widgets inside the QScrollArea overflows. After many experiments, I propose a way which can show scroll bars as you expected. The...

   C++,Qt,GUI,QScrollBar,ScrollBar,Not display,Solution     2012-03-03 07:48:36

  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())...

   Qt,C++,QWidget,Image     2012-08-19 12:01:18