In the constructor I have :

Qt Code:
  1. viewport()->setBackgroundMode( Qt::NoBackground ); viewport()->setFocusPolicy(QWidget::StrongFocus);
To copy to clipboard, switch view to plain text mode 

Apart from the above two lines, I dont do much with the viewport. I only use resizeContents according to the size of my drawing and then call repaint().

Can you please explain this a little more? All this while I thought I was doing the write thing.

Thanks a lot