A university student has narrowly escaped serious injury after being hit in the head by a collapsing roof whilst at the gym in far north Queensland.

The alarming incident comes as Townsville has been declared a disaster zone as huge rains have caused major flooding.

The rains where heavy enough to cause a landslide in the CBD yesterday, leaving weirs and dams overflowing.