Clicking QLabel should open a default web browser with URL link specified. It is not happening yet. Why? A second question. Would it be possible to override the default blue color of the Label's font with something else?
class Widget(QtGui.QWidget):
def __init__(self, *args):
QtGui.QWidget.__init__(self, *args)
vLayout=QtGui.QVBoxLayout(self)
self.setLayout(vLayout)
urlLink="<a href=\"http://www.google.com\">'Click this link to go to Google'</a>"
label=QtGui.QLabel(self)
label.setText(urlLink)
vLayout.addWidget(label)
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
w = Widget()
w.show()
sys.exit(app.exec_())