A correlation between redshifts (z) and apparent magnitudes (V) (Hubble relation) of Quasi Stellar Objects (QSOs) has long been sought. Such a correlation exists for galaxies whose redshifts are of cosmological origin. However, a plot of the two quantities representing the Hubble diagram for QSOs exhibits, in general, a wild scatter. This raises the question whether redshifts of QSOs are cosmological. On the other hand, most luminous QSOs in groups, and subsamples with particular properties, have been reported to show the Hubble relation. In the present paper, we analyse all optically non-variable QSOs in a comprehensive sample. In our analysis we grouped the objects into certain intervals of apparent magnitudes. Correlations obtained between redshifts and magnitudes are all statistically robust. Also, the Hubble relation in the usual formV = 5 logz +C is obeyed very convincingly for QSOs withV < 19.5.