小编Edu*_*yva的帖子

如何在pyqt中的QTextEdit上创建超链接以启动邮件

我想要一个超链接来在 QTextEdit 中启动邮件客户端。我尝试了此操作,但单击链接时没有任何反应:

self.text_area = QTextEdit()
self.text_area.setReadOnly(True)
self.text_area.setText(u'<p> Jhon Doe <a href='"'mailto:jhon@compay.com'"'>jhon@compay.com</a>  </p>')
self.text_area.setTextInteractionFlags(Qt.LinksAccessibleByMouse)
Run Code Online (Sandbox Code Playgroud)

python pyqt qtextedit pyqt5

2
推荐指数
1
解决办法
1577
查看次数

标签 统计

pyqt ×1

pyqt5 ×1

python ×1

qtextedit ×1