Replace buffer interface by QPainter.