We have employed a chip-bending method to exert continuous and reversible control over the tensile stress in doubly clamped nanomechanical beam resonators. Tensile stress is shown to increase the quality factor of both silicon nitride and single-crystal silicon resonators, implying that added tension can be used as a general, material-independent route to increased quality factor. With this direct stretching technique, we demonstrate beam resonators with unprecedented tunability of both frequency and quality factor. Devices can be tuned back and forth between a high and low stress state, with frequency tunability as large as several hundred percent demonstrated. Over this wide range of frequency, quality factor is also tuned by as much as several hundred percent, providing insights into the loss mechanisms in these materials and this class of nanoresonator. Devices with frequencies in the 1-100 MHz range are studied, with quality factor as high as 390,000 achieved at room temperature, for a silicon nitride device with cross-sectional dimensions below 1 microm, operating in a high stress state. This direct stretching technique may prove useful for the identification of loss mechanisms that contribute to the energy balance in nanomechanical resonators, allowing for the development of new designs that would display higher quality factors. Such devices would have the ability to resolve smaller addendum masses and thus allow more sensitive detection and offer the potential for providing access to previously inaccessible dissipation regimes at low temperatures. This technique provides the ability to dramatically tune both frequency and quality factor, enabling future mechanical resonators to be used as variable frequency references as well as variable band-pass filters in signal-processing applications.