Is there a way to add a clickable hyperlink in a Qt Dialog? I.e. it should look like a hyperlink (blue text), and when you click on it, it should open the hyperlink in the browser. Something like that:
有没有办法在Qt对话框中添加可点击的超链接?即它应该看起来像一个超链接(蓝色文本),当你点击它时,它应该打开浏览器中的超链接。像这样的东西:
1 个解决方案
#1
33
Use QLabel::setOpenExternalLinks(bool)
, and set text on label <a href="yourlink">link text</a>
.
使用QLabel :: setOpenExternalLinks(bool),并在标签链接文本上设置文本。
#1
33
Use QLabel::setOpenExternalLinks(bool)
, and set text on label <a href="yourlink">link text</a>
.
使用QLabel :: setOpenExternalLinks(bool),并在标签链接文本上设置文本。