Convert quantity widget to integer.