By means of two-dimensional, general relativistic magnetohydrodynamical simulations we investigate the oscillations of magnetized neutron star models (magnetars) for one particular dipolar magnetic field configuration including the description of an extended solid crust. The aim of this study is to understand the origin of the quasi-periodic oscillations (QPOs) observed in the giant flares of soft gamma-ray repeaters (SGRs). We confirm our previous findings which showed the existence of three different regimes in the evolution depending on the magnetic field strength: (a) a weak magnetic field regime B < 5 × 1013 G, where crustal shear modes dominate the evolution; (b) a regime of intermediate magnetic fields 5 × 1013 < B < 1015 G, where Alfvén QPOs are mainly confined to the core of the neutron star and the crustal shear modes are damped very efficiently and (c) a strong field regime B > 1015 G, where magnetoelastic oscillations reach the surface and approach the behaviour of purely Alfvén QPOs. When the Alfvén QPOs are confined to the core of the neutron star, we find qualitatively similar QPOs as in the absence of a crust. The lower QPOs associated with the closed field lines of the magnetic field configuration are reproduced as in our previous simulations without crust, while the upper QPOs connected to the open field lines are displaced from the polar axis. The position of these upper QPOs strongly depends on the magnetic field strength. Additionally, we observe a family of edge QPOs and one new upper QPO, which was not previously found in the absence of a crust. We extend our semi-analytic model to obtain estimates for the continuum of the Alfvén oscillations. Our results do not leave much room for a crustal-mode interpretation of observed QPOs in SGR giant flares, but can accommodate an interpretation of these observations as originating from Alfvén-like, global, turning point QPOs (which can reach the surface of the star) in models with mean surface magnetic field strengths in the narrow range of 3.8 × 1015≲B≲ 1.1 × 1016 G (for a sample of two stiff equation of state and various masses). This range is somewhat larger than estimates for magnetic field strengths in known magnetars. The discrepancy may be resolved in models including a more complicated magnetic field structure or with models taking superfluidity of the neutrons and superconductivity of the protons in the core into account.