Problem solved through reimplementing paintEvent.