Link defined in QtLabel won't open external browser

Skip to first unread message

Jakob Kousholt

Mar 18, 2021, 10:34:55 AMMar 18
to Python Programming for Autodesk Maya
Hey Everyone,

I am trying to link to an external website from my PyQt UI. Here's a simple example of what I have written:

link = QtWidgets.QLabel()
link.setText("<a style='color:white;' href='' target='_blank'>Google Example</a>")

The link shows up just fine - including the styling. When I right click on the label, Qt offers me to copy the link location, so the link works, except when I click the link nothing happens. I would have loved to see chrome or firefox open up. Any ideas what I am missing? Thanks

Marcus Ottosson

Mar 18, 2021, 11:24:42 AMMar 18
Just one piece of the puzzle missing.

You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Jakob Kousholt

Mar 18, 2021, 11:47:18 AMMar 18
to python_inside_maya

Marcus Ottosson

Mar 18, 2021, 12:23:07 PMMar 18
Reply all
Reply to author
0 new messages