from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4 import QtCore, QtGui from PyQt4.QtWebKit import * import Ui_onlinehelpdialog class OnlinehelpDialog(QDialog, Ui_onlinehelpdialog.Ui_helpDialog): def __init__(self, parent=None): super(OnlinehelpDialog, self).__init__(parent) self.setupUi(self) self.web = QWebView() self.verticalLayout.addWidget(self.web) self.web.load(QUrl("http://www.bacula.org/5.0.x-manuals/en/main/main/Configuring_Director.html")) self.web.show() def loadURL(self,URL): if self.isVisible(): print "loading " + URL self.web.load(QUrl(URL)) if __name__ == "__main__": import sys app = QApplication(sys.argv) dialog = OnlinehelpDialog() dialog.show() app.exec_()