Skip to main content

PyQt auto search bar

Project description

pyqt-auto-search-bar

PyQt auto search bar which is search icon on the left only exists as a label, not clickable button. See the preview below.

This is useful to instant search feature.

Requirements

  • PyQt5 >= 5.8

Setup

python -m pip install pyqt-auto-search-bar

Included Packages

Methods Overview

  • setLabel(visibility: bool = True, text=None)

Set the visibility of search icon. You can set the text with this function too.

  • setSearchIcon(icon_filename: str)

Set the icon. icon should be svg file.

  • setPlaceHolder(text: str)

  • getSearchBar()

  • getSearchLineEdit()

  • getSearchLabel()

Preview

Code Sample

from PyQt5.QtWidgets import QApplication

from pyqt_auto_search_bar import AutoSearchBar





if __name__ == "__main__":

    import sys



    app = QApplication(sys.argv)

    searchBar = AutoSearchBar()

    searchBar.show()

    app.exec_()

Result

image

See Also

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-auto-search-bar-0.0.11.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

pyqt_auto_search_bar-0.0.11-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

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