In the present work we show a way of controlling photoluminescence (PL) pro
perties through photoinduced quasi-crystal formation in a system based on p
oly(4-vinyl pyridine) (P4VPy). Under UV irradiation at 380 nm, concentrated
solutions of P4VPy in pyridine turn into gel. This phase transition result
s in changes in the optical properties of this polymer. The position of the
PL maximum can be changed continuously from 440 to 480 nm during irradiati
on. After several minutes of UV irradiation a new red-shifted PL at 492 nm
appears upon excitation by light of a wavelength corresponding to that of t
he initial PL maximum, which is also red-shifted during irradiation. Soluti
ons of P4VPy in pyrimidine show similar behavior, but those in pyridazine d
o not exhibit such behavior. We have found that the reason for the observed
changes in the electronic properties is a photoinduced directional orderin
g of polymer molecules in a special quasi-crystal formation. The process or
iginates from a structural change in the side chain of P4VPy, namely, proto
nation of the polymeric pyridine after solvation. During irradiation, the p
olymeric pyridinium ion interacts with neutral polymeric pyridine molecules
. Interchain interaction through hydrogen bonds lead to an electronic prope
rty change. We observed that the process of photoinduced sol-gel transforma
tion is reversible. Mechanical perturbation or heating can convert the gel
back to a fluid solution. The red-shifted PL is not observed, and the initi
al PL is blue-shifted to 450 nm and stays there.