-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from PyQt5.QtWidgets import QWidget, QVBoxLayout | ||
from PyQt5.QtWebEngineWidgets import QWebEngineView | ||
from PyQt5.QtCore import QUrl | ||
|
||
# shamelessly ripped off from: http://zetcode.com/pyqt/qwebengineview/ | ||
|
||
|
||
class Documentation(QWidget): | ||
def __init__(self): | ||
super().__init__() | ||
self.init_UI() | ||
|
||
def init_UI(self): | ||
vbox = QVBoxLayout(self) | ||
self.webEngineView = QWebEngineView() | ||
self.load_page() | ||
vbox.addWidget(self.webEngineView) | ||
self.setLayout(vbox) | ||
self.setGeometry(100, 100, 1000, 800) | ||
self.setWindowTitle('CIM Documentation') | ||
self.show() | ||
|
||
def load_page(self): | ||
with open('./docs/documentation.html', 'r') as f: | ||
html = f.read() | ||
self.webEngineView.setHtml(html, baseUrl=QUrl('file:///docs/')) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
PyQt5 | ||
PyQtWebEngine | ||
numpy | ||
matplotlib | ||
scikit-image |