pyqt-left-right-text-completer
PyQt Left text, right text completer. Left text is major target of search.
Detailed Description
QCompleter's popup widget is gridless QTableView. Right text is gray colored.
You can add a new pair of text to search with addText(text1, text2).
Text1 is left text, text2 is right text.
This completer is case insensitive as default.
Requirements
PyQt5 >= 5.8
Setup
python -m pip install pyqt-left-right-text-completer
Example
Code Example
from PyQt5.QtWidgets import QMainWindow, QLineEdit, QApplication
from pyqt_left_right_text_completer import LeftRightTextCompleter
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.__initUi()
def __initUi(self):
searchBar = QLineEdit()
completer = LeftRightTextCompleter()
for i in range(1, 128):
completer.addText(chr(i), f'{i}') # chr(i) is left text, f'{i} is right text.
searchBar.setCompleter(completer)
self.setCentralWidget(searchBar)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
sys.exit(app.exec_())
Result
Metadata
Release files for pyqt-left-right-text-completer 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyqt-left-right-text-completer-0.0.1.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyqt_left_right_text_completer-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / pyqt-left-right-text-completer-0.0.1.tar.gz
| Download URL | pyqt-left-right-text-completer-0.0.1.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f602dca63233d662135a13abd3c2a2ac6a327a7ca107cd0fb43d5cf07905b7d8
|
|
BLAKE2b-256 checksum How to use checksums |
6ed4d43004d4245eb1e377fa8e38f77d243861103372b1392a3c74c01b710978
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 CPython/3.7.6
|
Release files / pyqt_left_right_text_completer-0.0.1-py3-none-any.whl
| Download URL | pyqt_left_right_text_completer-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
495dd842472560f9ff3065143d4c15214c1c0cd6b775846ba3355714351d93fb
|
|
BLAKE2b-256 checksum How to use checksums |
f77f0b81ee8ecf3c9901ff9f45e04514ee845e98459feabc295419fe9a52f5c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 CPython/3.7.6
|