I don't know why I'm having such a hard time finding this, but how do you add a hyperlink to QTextEdit
or QTextBrowser
? I'm trying to make something that has a list of links and when you click on a link you get the object that the link is referencing.
相关问题
- QML: Cannot read property 'xxx' of undefin
- QTextEdit.find() doesn't work in Python
- QT Layouts, how to make widgets in horizontal layo
- QT Layouts, how to make widgets in horizontal layo
- QT GUI freezes even though Im running in separate
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- Is there a non-java, cross platform way to launch
- How to get a settings storage path in a cross-plat
- How to set the font size of the label on pushbutto
- Why doesn't valgrind detect a memory leak in m
- QTreeView remove decoration/expand button for all
- qt界面拥挤
You need to set the
acceptRichText
property to true. Then you can just pass in HTML using thesetHTML()
slot.win.setHTML("<a href="http://foo>Bar</a>");