I'm not as nice about this as some because I will not tolerate being hit by a kid, no matter what age.
What I did with mine (1 daughter, 2 stepsons, 9 grandchildren, two of which have lived with me for extended periods of time) is the VERY FIRST TIME they hit me or attempted to hit me because I NEVER let them do it, is to grab their arm, look them directly in the eye with a VERY stern look on my face and tell them in no uncertain terms and in a VERY strict tone "You don't hit grandma ever. Not even playing. NEVER raise your hand to me again." I usually never had to tell them more than once and to this day I have NEVER been hit by any one of my kids, stepkids or grandkids.
This is something I absolutely do not tolerate not even one time. This is a matter of respect. If you let them get away with it as a baby, mark my words they will do it again.
I have said on this site many times that I am "old school" and "old school" is all about respect!
By the way, if you're not a spanker, how did your daughter learn to hit. People all the time think that spanking a child teaches them to hit. If that's the case, where did your daughter learn it. My philosophy is we all know how to be violent - we are animals even if we are civilized and at the top of the food chain (in most instances). What we need to learn and to teach is self-control. So even non-spanked children are violent and do hit so just because a spanked child hits, doesn't mean they learned it from their parents!