We study the optical emission of single semiconductor quantum dots weakly coupled to a photonic-crystal micro-cavity. The linearly polarized emission of a selected quantum dot changes continuously its polarization angle, from nearly perpendicular to the cavity mode polarization at large detuning, to parallel at zero detuning, and reversing sign for negative detuning. The linear polarization rotation is qualitatively interpreted in terms of the detuning dependent mixing of the quantum dot and cavity states. The present result is relevant to achieve continuous control of the linear polarization in single photon emitters.