We present a set of six 20 year experiments made with a state-of-the-art chemistry-climate model that incorporates the atmosphere from the surface to the lower thermosphere. The response of the middle atmosphere to the 11 year solar cycle, its impact on the troposphere, and especially the role of an externally prescribed stratospheric quasi-biennial oscillation (QBO) is investigated with NCAR's Whole Atmosphere Community Climate Model (WACCM3). The model experiments use either fixed solar cycle inputs or fixed solar cycle together with prescribed QBO phase. The annual mean solar response in temperature and ozone in the upper stratosphere is in qualitative agreement with other modeling and observational studies and does not depend on the presence of the imposed QBO. However, the solar response in the middle to lower stratosphere differs significantly for the two QBO phases. During solar maxima a weaker Brewer-Dobson circulation with relative downwelling, warming, and enhanced ozone occurs in the tropical lower stratosphere during QBO east conditions, while a stronger circulation, cooling, and decreased ozone exists during QBO west conditions. The net ozone increase during QBO east is the combined result of production and advection, whereas during QBO west the effects cancel each other and result in little net ozone changes. Especially during Southern Hemisphere late winter to early spring, the solar response at polar latitudes switches sign between the two QBO phases and qualitatively confirms observations and other recent model studies. During a poleward downward modulation of the polar night jet and a corresponding modulation of the Brewer-Dobson circulation in time, solar signals are detected all the way down to the extratropical troposphere. Possible limitations of the model experiments with respect to the fixed solar cycle conditions or the prescribed QBO phases, as well as the constant sea surface temperatures, are discussed.