{"id":14982721,"url":"https://github.com/yjg30737/pyqt-tooltip-widget","last_synced_at":"2026-02-19T06:32:09.501Z","repository":{"id":57679220,"uuid":"478365180","full_name":"yjg30737/pyqt-tooltip-widget","owner":"yjg30737","description":"PyQt QWidget as a tooltip","archived":false,"fork":false,"pushed_at":"2022-05-13T22:25:20.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-29T08:44:54.707Z","etag":null,"topics":["pyqt","pyqt-examples","pyqt-tutorial","pyqt5","pyqt5-examples","qenterevent","qleaveevent","qt","qt5","qtooltip"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yjg30737.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-06T01:52:42.000Z","updated_at":"2024-06-04T11:13:08.000Z","dependencies_parsed_at":"2022-09-04T06:20:58.068Z","dependency_job_id":null,"html_url":"https://github.com/yjg30737/pyqt-tooltip-widget","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yjg30737/pyqt-tooltip-widget","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-tooltip-widget","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-tooltip-widget/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-tooltip-widget/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-tooltip-widget/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yjg30737","download_url":"https://codeload.github.com/yjg30737/pyqt-tooltip-widget/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yjg30737%2Fpyqt-tooltip-widget/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29604790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T05:11:50.834Z","status":"ssl_error","status_checked_at":"2026-02-19T05:11:38.921Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pyqt","pyqt-examples","pyqt-tutorial","pyqt5","pyqt5-examples","qenterevent","qleaveevent","qt","qt5","qtooltip"],"created_at":"2024-09-24T14:05:54.849Z","updated_at":"2026-02-19T06:32:09.472Z","avatar_url":"https://github.com/yjg30737.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyqt-tooltip-widget\nPyQt QWidget as a tooltip\n\n## Requirements\n* PyQt5 \u003e= 5.8\n\n## Setup\n`python -m pip install pyqt-tooltip-widget`\n\n## Detailed Description\nThis is `QWidget` which is activated like tooltip. When mouse cursor enters to the widget, `ToolTipWidget` pops up at the bottom left of the widget. Leave from the widget tooltip will be disappeared.\n\nI made it work by catching `QEnterEvent` and `QLeaveEvent` of widget.\n\n`ToolTipWidget` inherits `QWidget`, so you can decorate it just like `QWidget`.\n\n### Usage\n\nJust make instance of it like `self.toolTip = ToolTipWidget(yourWidget)`. `yourWidget` argument is the widget which you want to set tooltip of. Instance should be class variable.\n\n### Method Overview\n* `setStillOpenWhenCursorLeaveFromToolTipWidget(f: bool)` - Tooltip will be kept showing when cursor is inside the tooltip. (this is disabled by default) \n* `isStillOpenWhenCursorLeaveFromToolTipWidget() -\u003e bool`\n\n## Example\nCode Sample\n```python\nfrom PyQt5.QtWidgets import QWidget, QMainWindow, QHBoxLayout, QPushButton, QApplication, QVBoxLayout\nfrom pyqt_date_table_widget import DateTableWidget\nfrom pyqt_tooltip_widget import ToolTipWidget\n\n\nclass MainWindow(QMainWindow):\n    def __init__(self):\n        super().__init__()\n        self.__initUi()\n\n    def __initUi(self):\n        btn = QPushButton('Show Date Table Widget')\n        lay = QHBoxLayout()\n        lay.addWidget(btn)\n\n        mainWidget = QWidget()\n        mainWidget.setLayout(lay)\n\n        ### Make tooltip start ###\n        dateTableWidget = DateTableWidget() # https://github.com/yjg30737/pyqt-date-table-widget.git\n        lay = QVBoxLayout()\n        lay.addWidget(dateTableWidget)\n        lay.setContentsMargins(0, 0, 0, 0)\n\n        self.__tooltip = ToolTipWidget(btn)\n        self.__tooltip.setFixedSize(200, 200)\n        self.__tooltip.setLayout(lay)\n        ### Make tooltip end ###\n\n        self.setCentralWidget(mainWidget)\n\n\nif __name__ == \"__main__\":\n    import sys\n\n    app = QApplication(sys.argv)\n    example = MainWindow()\n    example.show()\n    app.exec_()\n\n```\n\nResult\n\n![image](https://user-images.githubusercontent.com/55078043/161909861-a724e0c5-4b16-4fa0-ab0b-7144b1386d82.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjg30737%2Fpyqt-tooltip-widget","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyjg30737%2Fpyqt-tooltip-widget","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyjg30737%2Fpyqt-tooltip-widget/lists"}