pyqt-find-text-widget
PyQt widget which can be used to find text in QTextEdit/QTextBrowser
Requirements
PyQt5 >= 5.8
Setup
python -m pip install pyqt-find-text-widget
Included Packages
Feature
-
Find previous, next occurence based on text cursor's position
-
prev shortcut: Ctrl+Shift+D
-
next shortcut: Ctrl+D
-
-
Match case
-
Makes find match only complete words
-
Providing prev, next, close signals
-
Enable to set close button with
setCloseBtn(f: bool)
I'm still working with regex feature.
Signal
-
prevClicked
-
nextClicked
-
closeSignal
Usage
Code Sample
from PyQt5.QtWidgets import QMainWindow, QApplication, QGridLayout, QWidget, QTextEdit
from pyqt_find_text_widget.findTextWidget import FindTextWidget
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.__initUi()
def __initUi(self):
self.__te = QTextEdit()
self.__te.setStyleSheet('QTextEdit { selection-background-color: lightblue; }') # I wrote this code because color of default selection doesn't stand out in the white textedit screen.
self.__w = FindTextWidget(self.__te)
lay = QGridLayout()
lay.addWidget(self.__w)
lay.addWidget(self.__te)
mainWidget = QWidget()
mainWidget.setLayout(lay)
self.setCentralWidget(mainWidget)
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
sys.exit(app.exec_())
Result
Note: Button icons in preview are obsolete. Back then these icons were PNG, now these are SVG! So don't worry about the difference.
Match case & complete word only example
Metadata
Release files for pyqt-find-text-widget 0.0.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyqt-find-text-widget-0.0.12.tar.gz | 12.6 kB | Without provenance | Details for pyqt-find-text-widget-0.0.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyqt_find_text_widget-0.0.12-py3-none-any.whl | Python 3 | none | any | Details for pyqt_find_text_widget-0.0.12-py3-none-any.whl |
Total release size: 26.5 kB
Release files / pyqt-find-text-widget-0.0.12.tar.gz
| Download URL | pyqt-find-text-widget-0.0.12.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
251e67508fa335a569155c400e666af09043c0431d98de9cedb0815ecbfca28d
|
|
BLAKE2b-256 checksum How to use checksums |
880ad285e210531e894f49e65fe327948ba3b8338c30a5abb06fbb30c61a4d09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 CPython/3.7.6
|
Release files / pyqt_find_text_widget-0.0.12-py3-none-any.whl
| Download URL | pyqt_find_text_widget-0.0.12-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51ef77766a41523402c3b60aec43a10829819d37d4f59fe1094f2b6276fc79b0
|
|
BLAKE2b-256 checksum How to use checksums |
6efcfe440a484e47a70742e94ca5835cb6a2ccaa6997b9e25560d51d4c9a76ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 CPython/3.7.6
|
Security for pyqt-find-text-widget 0.0.12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.