pyqt4: Open website in standard browser on button click
You can also use QDesktopServices::openUrl
.
Here's the minimal working example,
from PyQt5.Qt import QApplication, QUrl, QDesktopServices
import sys
app = QApplication(sys.argv)
url = QUrl("https://stackoverflow.com/questions/3684857/pyqt4-open-website-in-standard-browser-on-button-click")
QDesktopServices.openUrl(url)
you can use the python webbrowser module
import webbrowser
webbrowser.open('http://stackoverflow.com')