A thiolate precursor was dispersed in a polymer solution and a precursor/polymer film was obtained by casting. Thermal annealing of the precursor/polymer film leads to the formation of a nanocomposite of nanometer-sized CdS dispersed in the polymer (thermolytic process). Different polymers were used as matrix material; in particular we employed a cyclo-olefin copolymer for its good optical properties and extremely low water absorption. After annealing with a temperature between 230 and 250°C in vacuum (pressure of about 6×10−3 mbar) the CdS nanoparticles are found to be crystalline with a diameter of about 2nm in size. The nanoparticle size can be increased up to 15nm by annealing at higher temperatures (300°C). The details of the structural properties of the nanocomposite films have been investigated by small and wide angle x-ray scattering (SAXS and WAXS, respectively). A simple dependence of the nanoparticle dimensions on the annealing temperature was found. Furthermore, SAXS measurements indicate that the separation between the nanoparticles compares with their diameter.