paintEvent iteration