【发布时间】:2013-10-18 17:09:52
【问题描述】:
我将以下变量附加到“QTextBrowser”。它确实显示为链接,但是当我单击它时,“QTextBrowser”中的所有文本都消失了。 'anchorClicked' 信号连接到的所有功能都是在 shell 中打印一些东西,以便我知道信号已被接收。
word = '<a href>' + '<span style="background-color:#C0C0C0">' + word + '</span>' +'</a>'
self.textBrowser.anchorClicked.connect(self.test)
def test(self,argv_1):
print('!!!')
【问题讨论】:
-
请更新您的问题以显示导致问题的实际代码。
-
我添加了另一部分。
标签: python-3.x pyqt href pyside qtextbrowser