1 from PyQt5
import QtWidgets
5 QtWidgets.QWidget.__init__(self, parent)
6 l=QtWidgets.QVBoxLayout(self)
7 l.setContentsMargins(0,0,0,0)
8 self.setWindowTitle(
'OpenStructure Help')
11 self.
doctext=QtWidgets.QTextEdit(
'', self)
16 help(str(self.searchbox.text()))
19 panels=gui.GostyApp.Instance().perspective.panels
20 panels.AddWidgetToPool(
"OpenStructure Help",doc_widget_for_panel)
28 doc_widget.doctext.setHtml(
'')
29 doc_widget.searchbox.setText(
'')
32 s=d.document(pydoc.resolve(what)[0])
33 except ImportError, detail:
35 doc_widget.doctext.setHtml(s)
36 doc_widget.searchbox.setText(
'')
37 if not doc_widget.isVisible():
38 panels.AddWidget(gui.PanelPosition.RIGHT_PANEL, doc_widget_for_panel,
False)
40 return 'Type help() for interactive help, or help(object) for help about object.'