Text editor in Python & Qt5