We study a generalization of the quantum model of fully isotropic uniaxial p-polar glasses with multicomponent orientational degrees of freedom and Gaussian-distributed random, infinite-range exchange interactions. The quantum effects are associated with a finite moment of inertia (treated quantum mechanically) of a particle with M orientational degrees of freedom. The system exhibits a quantum phase transition separating the glassy and paraorientational phases regulated by a parameter \ensuremath{\Delta} (inverse of the moment of inertia of a particle). The model allows in the limit M\ensuremath{\rightarrow}\ensuremath{\infty} for an exact solution both in the glassy and disordered phases for an arbitrary value of the parameter p. We have analytically established the closed form of the self-consistency solution for the dynamic order parameter within the replica method and show that different spin glass transition scenarios emerge as a function of the parameter p. Whereas for p=1 (dipolar case) the solution of the quantum glass model is exact within replica symmetry, with a continuous phase transition along the critical line ${\mathit{T}}_{\mathit{c}}$(\ensuremath{\Delta}) we showed that the model for p\ensuremath{\ge}2 (multipolar case) undergoes a first-order phase transition. In the latter case within the Parisi replica-symmetry-breaking scheme we have determined a functional Parisi-like order parameter q(x) and demonstrated that for p\ensuremath{\ge}2 a single step of the replica symmetry breaking is the exact solution within the glassy phase. For the physically most relevant case of p=2 (quantum quadrupolar glass) the \ensuremath{\Delta}-T phase diagram has been computed numerically. \textcopyright{} 1996 The American Physical Society.