A Qt package that lets you use web URLs as tooltips in Qt widgets
Project description
A Qt package that lets you use web URLs as tooltips in Qt widgets.
Free software: BSD 2-Clause License
Requires
PySide or PyQt4 with QtWebKit included.
Installation
pip install qwebtip
How To Use
Import qwebtip’s main model, qweburltip and set it to override one of your widget’s tooltips with some URL.
The next time you build your application and hover over that widget, a URL box is displayed with that URL, instead.
from qwebtip import qweburltip
url = 'http://pyqt.sourceforge.net/Docs/PyQt4/qwebframe.html'
qweburltip.override_tool_tip(QtWidgets.QLabel('Some label'), url)
How To Use - Customizing
Setting a custom tooltip size
from qwebtip import qweburltip
url = 'http://pyqt.sourceforge.net/Docs/PyQt4/qwebframe.html'
qweburltip.override_tool_tip(
QtWidgets.QLabel('Some label'),
url,
width=100,
height=400,
)
Opening the URL at a specific header section
url = 'http://pyqt.sourceforge.net/Docs/PyQt4/qwebframe.html'
qweburltip.override_tool_tip(
self.line_edit,
element_selector.UnknownHeaderSelector(
url,
'Method Documentation',
),
)
Disabling Caching
Loaded webpages are cached so that successive loads can be kept fast. To disable caching, set this environment variable.
export QWEBTIP_DISABLE_CACHING=1
This is useful for debugging but is not recommended.
Changelog
0.2.0 (2019-06-02)
Reformatted the code to use [black](https://github.com/python/black)
0.1.0 (2018-12-04)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file qwebtip-0.2.0.zip
.
File metadata
- Download URL: qwebtip-0.2.0.zip
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 855e4b77e6e1b1b4a93d0e085a06a81ab540a20acd3e64941f959af654404d75 |
|
MD5 | b989a2ba3b16ca71459516d39759e909 |
|
BLAKE2b-256 | 13356d3b39fe22ee4eff2e1ad7d6f4bb2b5d0b7644f0b32cb18078a0346729f2 |