Seems like QString::left() might be more suitable here.