Colloidal perovskite quantum dots (CsPbX3) are highly desirable in optoelectronics due to their favorable optical properties. However, their instability limits their practical application. This study investigates the use of metal-organic frameworks as carrier matrices for perovskite quantum dots, which could enhance their stability without compromising their optical properties. Here, CsPbBr3@ZIF-8 composite materials were synthesized through an in-situ growth method. The results demonstrate that the CsPbBr3 quantum dots in the composite exhibit a significantly longer lifetime (increasing from 11 ns to 39 ns), higher quantum yield (increasing from 32 % to 53 %) compared to pure perovskite quantum dots. The photothermal stability of the composite is also superior to that of the pure quantum dots, as the composite maintains 81 % of its quantum yield under light, 82 % under wet air, and 72.5 % under continuous heating at 120 °C. Furthermore, the CsPbBr3@ZIF-8 based flexible fluorescent film shows adjustable viscosity, which provides a novel approach for next-generation flexible displays.