How to link to network file with QLabel?

时间:2015-10-06 08:27:12

标签: python qt url

I'm using Python and Qt to design a GUI. It saves images to a location on my network. When an image is saved, I'd like to set a QLabel's text to show a link to the file. This works, but nothing happens when I click the link.

self.lblOverlayFileName.setText('<a href="file://///server/share/file.txt">link</a>')

I've set the setOpenExternalLinks property of the QLabel to True, and links to local files work as well as links to internet URLs. But not URLs of this form. Any idea why?

0 个答案:

没有答案