to get the box chars to be drawn correctly we need to turn on high
quality antialiasing in qpainter. in addition only turn it on if if
antialiasing is enabled.
lastly qpainter.save()/restore() is called very often, so try to avoid
that if it isn't necessary.