E5Gui/E5SimpleHelpDialog.py

Thu, 29 Jun 2017 18:51:03 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 29 Jun 2017 18:51:03 +0200
branch
maintenance
changeset 5776
49ba4a9f0421
parent 5769
944c04cec861
child 5786
6a1b25cff5fb
permissions
-rw-r--r--

Fixed an issue in the single application client.
(grafted from 3a8bedba97ab2185b912f3e0614c8b3bb9074b3f)

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

# Copyright (c) 2015 - 2017 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="", help="", parent=None):
        """
        Constructor
        
        @param title title of the window
        @type str
        @param label label for the help
        @type str
        @param help 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(help)

eric ide

mercurial