circumvent the circumstance where a doubleclick event occurs on the textedit instead of its viewport.

dont know how that happens, but an apple user reported it:
AttributeError: QStackedWidget has no cursorForPosition attribute