You need to change :
Qt::PenCapStyle
Qt::PenJoinStyle