PyQt QListWidget which shows text as tooltip longer than widget's size
Project description
pyqt-tooltip-list-widget
PyQt QListWidget which shows text as tooltip longer than widget's size
Requirements
- PyQt5 >= 5.8
Setup
python -m pip install pyqt-tooltip-list-widget
Example
Code Sample
from PyQt5.QtWidgets import QWidget, QGridLayout, QApplication
from pyqt_tooltip_list_widget import ToolTipListWidget
class Widget(QWidget):
def __init__(self):
super().__init__()
self.__initUi()
def __initUi(self):
self.__listWidget = ToolTipListWidget()
self.__listWidget.addItem(
'Note: The selection rectangle will only be visible if the selection mode is in a mode where more than one item can be selected; i.e., it will not draw a selection rectangle if the selection mode is QAbstractItemView::SingleSelection.')
self.__listWidget.addItem('B')
self.__listWidget.addItem('C')
lay = QGridLayout()
lay.addWidget(self.__listWidget)
lay.setContentsMargins(0, 0, 0, 0)
self.setLayout(lay)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
example = Widget()
example.show()
app.exec_()
Result
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
Built Distribution
Close
Hashes for pyqt-tooltip-list-widget-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83b722abbd6b55ed233b49efa486146dc79fcc7bec51ca5f713aa6bdc21edbd1 |
|
MD5 | c2d000f55f6011d64c907abf72f88a54 |
|
BLAKE2b-256 | 614e795fdb2caafb72ca54532c9ee9270f685c6818db1207563e1b1515b34360 |
Close
Hashes for pyqt_tooltip_list_widget-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70ce4c11058e39b051a9ecde93cdbaf9dc8a95642ccdd0051a483b1cd1c473e0 |
|
MD5 | 4ab38833a3e7f3fa91e082ccd43af48e |
|
BLAKE2b-256 | f6d32d138a78bc222cb5f13adabf2ba5ef783767e0ad96a5a826055ea83369f2 |