E5Gui/E5SimpleHelpDialog.py

Mon, 02 Apr 2018 12:04:18 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 02 Apr 2018 12:04:18 +0200
branch
maintenance
changeset 6206
a02b03b7bfec
parent 6048
82ad8ec9548c
child 6645
ad476851d7e0
permissions
-rw-r--r--

Merged with default branch to prepare new release.

# -*- coding: utf-8 -*-

# Copyright (c) 2015 - 2018 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing a dialog to show some help text.
"""

from __future__ import unicode_literals

from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDialog

from .Ui_E5SimpleHelpDialog import Ui_E5SimpleHelpDialog


class E5SimpleHelpDialog(QDialog, Ui_E5SimpleHelpDialog):
    """
    Class implementing a dialog to show some help text.
    """
    def __init__(self, title="", label="", helpStr="", parent=None):
        """
        Constructor
        
        @param title title of the window
        @type str
        @param label label for the help
        @type str
        @param helpStr HTML help text
        @type str
        @param parent reference to the parent widget
        @type QWidget
        """
        super(E5SimpleHelpDialog, self).__init__(parent)
        self.setupUi(self)
        self.setWindowFlags(Qt.Window)
        
        self.setWindowTitle(title)
        if label:
            self.helpLabel.setText(label)
        else:
            self.helpLabel.hide()
        self.helpEdit.setHtml(helpStr)

eric ide

mercurial