src/eric7/EricWidgets/EricSimpleHelpDialog.py

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8881
54e42bc2437a
child 9221
bf71ee032bb4
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2015 - 2022 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog to show some help text.
8 """
9
10 from PyQt6.QtCore import Qt
11 from PyQt6.QtWidgets import QDialog
12
13 from .Ui_EricSimpleHelpDialog import Ui_EricSimpleHelpDialog
14
15
16 class EricSimpleHelpDialog(QDialog, Ui_EricSimpleHelpDialog):
17 """
18 Class implementing a dialog to show some help text.
19 """
20 def __init__(self, title="", label="", helpStr="", parent=None):
21 """
22 Constructor
23
24 @param title title of the window
25 @type str
26 @param label label for the help
27 @type str
28 @param helpStr HTML help text
29 @type str
30 @param parent reference to the parent widget
31 @type QWidget
32 """
33 super().__init__(parent)
34 self.setupUi(self)
35 self.setWindowFlags(Qt.WindowType.Window)
36
37 self.setWindowTitle(title)
38 if label:
39 self.helpLabel.setText(label)
40 else:
41 self.helpLabel.hide()
42 self.helpEdit.setHtml(helpStr)

eric ide

mercurial