Context. Type-B quasi periodic oscillations (QPOs) in black-hole X-ray binaries (BHXRBs) are a class of low-frequency QPOs that are observed in the soft intermediate state in the rising and the declining phases of an outburst. They are suspected to result from the precession of the jet that is ejected from the source. Aims. The objective of the present work is to investigate in detail the emissivity of the jet in hard X-rays and to see whether the type-B QPOs from GX 339-4, which is the best studied black-hole transient, can be explained quantitatively with a precessing jet. Methods. We used our simple jet model, which invokes Comptonization in the jet, and examined the angular dependence of the upscattered photons that emerge from the jet and their energy distribution, which is a power law. Results. Due to the elongation of the jet, assisted by the bulk motion of the electrons, the angular distribution of the emerging hard Xray photons from the jet is not isotropic. More importantly, the photon-number spectral index, Γ, is an increasing function of the polar angle, θ, with respect to the axis of the jet. If the jet is fixed, then an observer at infinity sees the photon index, Γ, which corresponds to this specific observational direction. However, if the jet is precessing, then the observer sees a periodic variation of Γ with the precession period. Such a periodic variation of Γ has been observed in GX 339-4 and in this work, we reproduce it quantitatively, using our model. Conclusions. Our jet model nicely explains through quantitative means the type-B QPOs seen in GX 339-4 as originating from a precessing jet. The given model has previously explained several observed correlations thus far.