Fixed line widths when zooming in Qt 5

The grid and selection lines are not supposed to be affected by the zoom
level. In Qt 5, the default QPen width changed from 0 (which is
independent of the current transformation) to 1.