eric6/E5Gui/E5SimpleHelpDialog.py

changeset 6942
2602857055c5
parent 6645
ad476851d7e0
child 7229
53054eb5b15a
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2015 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to show some help text.
8 """
9
10 from __future__ import unicode_literals
11
12 from PyQt5.QtCore import Qt
13 from PyQt5.QtWidgets import QDialog
14
15 from .Ui_E5SimpleHelpDialog import Ui_E5SimpleHelpDialog
16
17
18 class E5SimpleHelpDialog(QDialog, Ui_E5SimpleHelpDialog):
19 """
20 Class implementing a dialog to show some help text.
21 """
22 def __init__(self, title="", label="", helpStr="", parent=None):
23 """
24 Constructor
25
26 @param title title of the window
27 @type str
28 @param label label for the help
29 @type str
30 @param helpStr HTML help text
31 @type str
32 @param parent reference to the parent widget
33 @type QWidget
34 """
35 super(E5SimpleHelpDialog, self).__init__(parent)
36 self.setupUi(self)
37 self.setWindowFlags(Qt.Window)
38
39 self.setWindowTitle(title)
40 if label:
41 self.helpLabel.setText(label)
42 else:
43 self.helpLabel.hide()
44 self.helpEdit.setHtml(helpStr)

eric ide

mercurial