Skip to main content

PyQt widget which can find and replace text in the QTextEdit/QTextBrowser

Project description

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

Example

I show you my full code sample. Set up this package, copy and paste this code to your IDE and run.

from PyQt5.QtWidgets import QMainWindow, QApplication, QGridLayout, QWidget, QTextEdit

from pyqt_find_replace_text_widget.findReplaceTextWidget import FindReplaceTextWidget





class 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 sys



    app = 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..

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyqt-find-replace-text-widget-0.0.14.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file pyqt-find-replace-text-widget-0.0.14.tar.gz.

File metadata

File hashes

Hashes for pyqt-find-replace-text-widget-0.0.14.tar.gz
Algorithm Hash digest
SHA256 fd457767f24ff26e0ad838049b1ef1612850437369fad1ca81e1af9406248332
MD5 f95b39ecadbd9071a778475cb008cf1b
BLAKE2b-256 268b8d9611a80f9248d4fbecd3dcbc9cc24831325ee213e9e9e742a09975868f

See more details on using hashes here.

File details

Details for the file pyqt_find_replace_text_widget-0.0.14-py3-none-any.whl.

File metadata

File hashes

Hashes for pyqt_find_replace_text_widget-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 29096dba569292113d222420f92b5a15d58ed403850fd7ed9104302d42d07462
MD5 751d137f38aaa8858f23b53a515a6d39
BLAKE2b-256 4a12c4f712afc9fcca7766ac1072a45203a5af471d5adf675fb8596223dd76bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page