And even if it's raining, the Cairns Central shopping centre will give about 1-2 hours of wandering (and spending

)
I'd hate to be stuck at Cairns Airport for 6 hours. Cairns is a great city (although not huge) and you could easily spend an hour or two wandering through the city and another few hours lazing by the lagoon.
Another (more touristy option) is to visit one of the attractions like the croc farm, or the Skyrail, or even rent a car and take the drive up to Port Douglas.
A cab ride into town should cost about $20, and be about 10-15 mins. (IIRC)