A theoretical investigation is performed in order to understand the origin of change of the operating wavelength of quantum dots-in-a-well photodetectors when the well width is varied. The energy levels and wave functions were found using the eight-band strain dependent k·p model and the intraband optical absorption spectrum was calculated in the dipole approximation within the framework of first order perturbation theory. It was found that the pure effect of changes of well width cannot be responsible for the shifts of the peaks observed in experiment [Raghavan et al., J. Appl. Phys. 96, 1036 (2004)], which are therefore ascribed to unintentional changes in dot dimensions.