Well, Ive' reimplemented mousePressEvent in a following fashion:
Qt Code:
  1. void MerchandiseWidget::mousePressEvent (QMouseEvent* event)
  2. {
  3. if(event->button()==Qt::LeftButton)
  4. {
  5. if(windowState()==false)
  6. {
  7. resize(QSize(WIDGET_WIDTH+WIDGET_WIDTH_DELTA, WIDGET_HEIGHT+WIDGET_HEIGHT_DELTA));
  8. setResizedState(true);
  9. }
  10. else
  11. {
  12. resize(QSize(WIDGET_WIDTH, WIDGET_HEIGHT));
  13. setResizedState(false);
  14. } // if
  15. } // if
  16. }
To copy to clipboard, switch view to plain text mode 
Now, the widget gets resized, but if I click on it again, it does not get smaller. Can you please tell me why?