We investigated the growth of CdS nanoparticles in polymer films by means of ex-situ and in-situ x-ray scattering experiments using synchrotron radiation. The CdS nanoparticles were synthesized by thermal decomposition of a Cd thiolate precursor dispersed in a cyclic olefin copolymer. The films were deposited by spin coating. Grazing incidence diffraction (GID) reveals the Bragg reflections of the CdS nanoparticles. In-situ diffraction and grazing incidence small angle scattering (GISAXS) experiments were recorded during the thermal treatment of the precursor/polymer films from room temperature up to 250°C. The diffraction curves show that the initial precursor structure is soon lost at 100°C. Correspondingly, the GISAXS data show a peak at a momentum transfer value q ∼ 0.2Å−1 that shifts towards smaller values with the temperature. Under UV excitation the films show photoluminescence in the range 400 – 700 nm.