Method 1: Use a mask on a QLineEdit
Method 2: Use four QLineEdit's and have the '.'s as QLabels
Method 3: Subclass QLinEdit and override paintEvent to nicely align the ip address (you can also do the validation in the subclass too)
If you want to allow copy/paste of the ip address, you should rule out method 2, but thats the way Windows IP control works (tab doesn't work properly there either).
Bookmarks