In this paper we use a newly compiled sample of ultra-compact structure in radio quasars and strong gravitational lensing systems with quasars acting as background sources to constrain six spatially flat and non-flat cosmological models (ΛCDM, PEDE, and DGP). These two sets of quasar data (time-delay measurements of six strong lensing systems and 120 intermediate-luminosity quasars calibrated as standard rulers) could break the degeneracy between the cosmological parameters (H 0 , Ω m , and Ω k ), and therefore provide more stringent cosmological constraints for the six cosmological models we study. A joint analysis of the quasar sample provides model-independent measurements of the Hubble constant H 0 , which are strongly consistent with that derived from the local distance ladder by the SH0ES collaboration in the ΛCDM and PEDE model. However, in the framework of the DGP cosmology (especially for a flat universe), the measured Hubble constant is in good agreement with that derived from the recent Planck 2018 results. In addition, our results show that zero spatial curvature is supported by the current lensed and unlensed quasar observations and that there is no significant deviation from a flat universe. For most of the cosmological models we study (flat ΛCDM, non-flat ΛCDM, flat PEDE, and non-flat PEDE), the derived matter density parameter is completely consistent with Ω m ∼ 0.30 in all the data sets, as expected based on the latest cosmological observations. Finally, according to the statistical deviance information criterion (DIC), the joint constraints provide substantial observational support to the flat PEDE model; however, they do not rule out dark energy being a cosmological constant and non-flat spatial hypersurfaces.