Skip to main content

PyQt QToolTip that user can add description and so on.

Project description

pyqt-description-tooltip

PyQt QToolTip that user can add description and so on.

Setup

python -m pip install pyqt-description-tooltip

Usage

You can get the qt tooltip text using static method below.

DescriptionToolTipGetter.getToolTip(title: str = '', shortcut: str = '', description: str = '', 

shortcut_color: str = '#AAA', description_color: str = '#AAA')

Example

Code Sample

from PyQt5.QtWidgets import QMainWindow, QPushButton, QApplication

from pyqt_description_tooltip import DescriptionToolTipGetter

from pyqt_style_setter import StyleSetter





class MainWindow(QMainWindow):

    def __init__(self):

        super().__init__()

        self.__initUi()



    def __initUi(self):

        btn = QPushButton('ToolTip Button')



        btn.setToolTip(DescriptionToolTipGetter.getToolTip(title='ToolTip Title', shortcut='Ctrl+T',

                                                description='ToolTip Description.',))

        self.setCentralWidget(btn)





if __name__ == "__main__":

    import sys



    app = QApplication(sys.argv)

    example = MainWindow()

    StyleSetter.setWindowStyle(example)

    # https://github.com/yjg30737/pyqt-style-setter.git

    example.show()

    app.exec_()

Result

image

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqt-description-tooltip-0.0.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

pyqt_description_tooltip-0.0.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page