Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/pyqt-find-replace-text-widget
PyQt widget which can find and replace text in the QTextEdit/QTextBrowser
https://github.com/yjg30737/pyqt-find-replace-text-widget
py37 pyqt pyqt5 pyqt5-desktop-application pyqt5-examples pyqt5-find-text pyqt5-gui pyqt5-replace-text python python3 qt qt-example qt-examples qt-gui qt5 qt5-gui qtextbrowser qtextedit replace-text
Last synced: about 1 month ago
JSON representation
PyQt widget which can find and replace text in the QTextEdit/QTextBrowser
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-find-replace-text-widget
- Owner: yjg30737
- License: mit
- Created: 2021-12-01T04:13:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-27T07:10:44.000Z (over 2 years ago)
- Last Synced: 2024-12-20T14:23:22.071Z (about 2 months ago)
- Topics: py37, pyqt, pyqt5, pyqt5-desktop-application, pyqt5-examples, pyqt5-find-text, pyqt5-gui, pyqt5-replace-text, python, python3, qt, qt-example, qt-examples, qt-gui, qt5, qt5-gui, qtextbrowser, qtextedit, replace-text
- Language: Python
- Homepage:
- Size: 73.2 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-find-replace-text-widget
PyQt widget which can find and replace text in the QTextEdit/QTextBrowser
## Class Overview
* FindReplaceTextWidget
* ReplaceTextWidget (This module is supposed to be submodule of FindReplaceTextWidget)## Requirements
* PyQt5 >= 5.8## Setup
`python -m pip install pyqt-find-replace-text-widget`## Included package
* pyqt-find-text-widget## Example
I show you my full code sample. Set up this package, copy and paste this code to your IDE and run.
```python
from PyQt5.QtWidgets import QMainWindow, QApplication, QGridLayout, QWidget, QTextEdit
from pyqt_find_replace_text_widget.findReplaceTextWidget import FindReplaceTextWidgetclass MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.__initUi()def __initUi(self):
self.__te = QTextEdit()
self.__te.setStyleSheet('QTextEdit { selection-background-color: lightblue; }')self.__w = FindReplaceTextWidget(self.__te)
lay = QGridLayout()
lay.addWidget(self.__w)
lay.addWidget(self.__te)mainWidget = QWidget()
mainWidget.setLayout(lay)self.setCentralWidget(mainWidget)
if __name__ == "__main__":
import sysapp = QApplication(sys.argv)
mainWindow = MainWindow()
mainWindow.show()
sys.exit(app.exec_())
```Result
Note: Button icons in preview are obsolete. Back then button icons were PNG, but now these are brand-new good looking SVG!
https://user-images.githubusercontent.com/55078043/146636169-eccd62b4-7964-40c1-a6c6-4fc813778a1e.mp4
## Note
There is exclude button but i don't add feature on it. I will add proper feature on that one.. or someone please do this instead of me, so busy..