Royce,
Those are called Flex Spex. I looked at those and they look like a good idea.
But, I don't know how well they would hold up.
I also don't think they would work well on a wide brimmed hat.
I'm also not sure about the angle of the glasses when attached to any sort of hat.