Looking at it, I would have to say that given how the professor is shown to wear his hat, and the position of the holes, it is more unbelievable to suggest that the bullet would have hit him - his head would have had to bulge up in an unfeasible way quite high inside the crown of the hat for the bullet to have touched him.
I find it far less of stretch than Captain Haddock landing in the chandelier after being struck by lightning, and then getting back to the floor with apparently no help, and not a scratch on him...!
The professor's hat is presumably made of felt, and, from the looks of it, has a leather hat-band (note the brown inside as Tintin takes it from Calculus's head at the top of p.7, and the Captain's hat rolling along in the wind on p.2, where it is caught by Snowy, where such a band can also be seen).
With this kind of hat, as opposed to a cap or a base-ball-type hat, the hat sits tight to the head only where the hat-band touches; the crown of the hat does not touch the head, but rises over it.
Panel 3 on p.7 clearly shows that Calculus actually wears a hat that is quite small for him, and therefore high on his head, as you can see his skull curves down at the back, with a gap between the brim and his hair-line. Given that the top of his head is unusually flat, there clearly isn't any way for a bullet entering and leaving the hat, as shown, to hit him.
Try it another way: the two images of the prof, side by side on the top row of p.7, one with the hat, and one without, are virtually identical. If you trace one off, and place it over the other, do the bullet holes intersect with his skull? I'd say not. Therefore it doesn't look like a mistake to me.
The "bullet whistling through a person's hat" also isn't an image unique to Tintin; Hergé may just have been using a trope from gangster and Western films, where people are often shown being shot in the hat, sometimes unawares, and then someone wiggling a finger in the hole to show what a close shave they had had ("Why, if that had only been a couple of inches lower...!").
A little bit of Googling also came up with several references to people who had actually had gunshots through their hats and not been hit; a few of these were in the American Civil War, where soldiers often wore kepis, so the cap's crown is even closer to the skull than Calculus's hat (the hats aren't pictured, unfortunately, so they may have been officers wearing larger, cowboy-style headgear, where the same principle as decscribed above for the Professor would still hold).
One unfortunate is described as being so glad at his luck of having survived the shot, that he stuck his hat on his ram-rod and waved it over his head in delight. This appears to have caught the attention of the enemy, who then promptly shot him again, and this time killed him.
mondrian:
...or possibly Calculus just raised his hat when the shot was fired to greet the person with a gun?
It's a lovely thought: good manners always pay off!