Wideband code division multiple access (WCDMA) uses orthogonal variable spreading factor (OVSF) codes to support diversified data transmission rates and quality of service (QoS). In this paper, we propose a OVSF code based framework to support QoS for WCDMA. This framework is based on several effective mechanisms of traffic classification, service group selection, OVSF code allocation and dynamic code reallocation. Simulations show that the proposed method has performance advantages in system utilization, code blocking probability, throughput, code reallocation and packet delay.