A ZnMgO/Ti 3 C 2 T x /ZnMgO 0D/2D/0D sandwich-like heterostructure composed of ZnMgO quantum dots and ultrathin Ti 3 C 2 T x MXene nanosheets is designed to enhance charge separation and migration of high-performance flexible ultraviolet photodetectors.