So you fire up your browser, type "Qt globalpos" into the Google search box, and what do you think you get as the first hit? Certainly faster than asking questions here and waiting for someone to answer.gives an AttributeError: 'QLineEdit' object has no attribute 'globalPos'
And since you already imported QTooltip from QtWidgets, you can probably remove the QtWidgets part of QtWidgets.QTooltip.showText and just use QTooltip.showText. I said I wasn't a Python expert. Also get rid of the separate import of all of QtWidgets. It just bogs things down at runtime.
Bookmarks