PyQt left text, right text completer. Left text is major target of search.
Project description
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
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-left-right-text-completer-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f602dca63233d662135a13abd3c2a2ac6a327a7ca107cd0fb43d5cf07905b7d8 |
|
MD5 | 712c7389ad33d34f6d9e6f3d219a61b2 |
|
BLAKE2b-256 | 6ed4d43004d4245eb1e377fa8e38f77d243861103372b1392a3c74c01b710978 |
Close
Hashes for pyqt_left_right_text_completer-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 495dd842472560f9ff3065143d4c15214c1c0cd6b775846ba3355714351d93fb |
|
MD5 | df8b5efd445ee7ea252a14a17065ea15 |
|
BLAKE2b-256 | f77f0b81ee8ecf3c9901ff9f45e04514ee845e98459feabc295419fe9a52f5c7 |