The strain distributions of quantum-wire structures are discussed by two methods, namely the continuum elasticity theory treated as a finite difference problem and the Green-function. Analytical expressions are derived for the strain fields with Green-function, which is simple for the regular shaped quantum-wire. The strain fields for arbitrary-shaped quantum-wire can be calculated by continuum elasticity theory and the influences of elastic constants are considered for different materials, although the results are less accurate. The effect of quantum-wire width on strain distribution and bandgap is analysed for InGaAs/GaAs quantum-wire nanostructures. The absolute magnitude of the strain in the bulk of the wire is attenuated significantly along the width direction. At the wire center, the strain-modified direct bandgap increases with the decrease in wire width.