By default, QAbstractItemView derivatives all erase their backgrounds at every repaint event. But what, if the view is custom and the view's items themselves erase their backgrounds? The view's erase is then superfluous. But if I do:

Qt Code:
  1. setAttribute(Qt::WA_NoSystemBackground);
To copy to clipboard, switch view to plain text mode 

on the view, the backgrounds of the view's scrollbars will not erase. Therefore, I wanted to erase their backgrounds "manually" (via fillRect()), while leaving the view's items to erase their own backgrounds.