Line | |
---|
1 |
|
---|
2 | from PyQt4.QtCore import *
|
---|
3 | from PyQt4.QtGui import *
|
---|
4 | from PyQt4 import QtCore, QtGui
|
---|
5 | from PyQt4.QtWebKit import *
|
---|
6 |
|
---|
7 | import Ui_onlinehelpdialog
|
---|
8 |
|
---|
9 | class OnlinehelpDialog(QDialog, Ui_onlinehelpdialog.Ui_helpDialog):
|
---|
10 | def __init__(self, parent=None):
|
---|
11 | super(OnlinehelpDialog, self).__init__(parent)
|
---|
12 | self.setupUi(self)
|
---|
13 | self.web = QWebView()
|
---|
14 | self.verticalLayout.addWidget(self.web)
|
---|
15 |
|
---|
16 | self.web.load(QUrl("http://www.bacula.org/5.0.x-manuals/en/main/main/Configuring_Director.html"))
|
---|
17 | self.web.show()
|
---|
18 |
|
---|
19 |
|
---|
20 | def loadURL(self,URL):
|
---|
21 | if self.isVisible():
|
---|
22 | print "loading " + URL
|
---|
23 | self.web.load(QUrl(URL))
|
---|
24 |
|
---|
25 |
|
---|
26 |
|
---|
27 |
|
---|
28 | if __name__ == "__main__":
|
---|
29 | import sys
|
---|
30 | app = QApplication(sys.argv)
|
---|
31 |
|
---|
32 | dialog = OnlinehelpDialog()
|
---|
33 |
|
---|
34 | dialog.show()
|
---|
35 | app.exec_()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.