By using 1H NMR, ESI-MS and UV spectra, a novel light-responsive molecular switch constructed using 1,1'-bis(benzyl)-4-[2-(4-pyridyl)-vinyl]-pyridinium (12+) and cucurbit[7]uril (Q[7]) is demonstrated. The E- to Z-isomerization of the double bond in 12+ results in the transition of the switching states from the 1 : 2 complex E-12+@Q[7]2 to the stable 1 : 1 complex Z-12+@Q[7]. In particular, both the 1 : 2 complex and the 1 : 1 complex can emit cold white fluorescence under UV light.