Hello,
I have some strange problem.
I have empty project, just clicked "New QT Widget Application", and after I execute that code:

Qt Code:
  1. void MainWindow::paintEvent(QPaintEvent *e)
  2. {
  3. cout << 1 << endl;
  4. }
To copy to clipboard, switch view to plain text mode 

I get result like:
1
1
1
1

So it looks like paintEvent function is repeated 4 times automaticaly. Why does it work like that? Can't I change it in some way to just one execution?

For any help thanks in advance.
Best Regards