PyQt search bar
Project description
pyqt-search-bar
PyQt search bar
Requirements
PyQt5 >= 5.8
Setup
python -m pip install pyqt-search-bar
Included Packages
Feature
-
Providing
searched(text: str)
signal to activate user-defined method after search. -
Set place holder directly with
setPlaceHolder(text: str)
. -
Available to execute the search with either pressing enter or pressing the search button.
-
Toggled search button based on whether searchLineEdit(type is QLineEdit) is empty or not.
-
Being able to get searchLineEdit and searchButton, closeButton to let user customize on their own.
-
Being able to set the label of the search bar with
setLabel(visibility: bool, text: str)
. -
Being able to close the search bar with
setCloseBtn(visibility: bool)
. -
Set search/close button's icon with
setSearchIcon(icon_filename: str)
,setCloseIcon(icon_filename: str)
. Note: Icon should be SVG file. -
Get search bar, search line edit, search/close button with
getSearchBar
,getSearchButton
,getCloseButton
to change style or feature.
Example
Basic
Code Example
from PyQt5.QtWidgets import QApplication
from pyqt_search_bar import SearchBar
if __name__ == "__main__":
import sys
app = QApplication(sys.argv)
searchBar = SearchBar()
searchBar.setPlaceHolder('Input the text...')
searchBar.show()
app.exec_()
Result
Empty search bar (search button is disabled)
Search bar which is not empty (search button is enabled)
See Also
- pyqt-instant-search-bar - instant search bar gui
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
Built Distribution
File details
Details for the file pyqt-search-bar-0.0.14.tar.gz
.
File metadata
- Download URL: pyqt-search-bar-0.0.14.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e7a496bc880c6f1fef9e7c9e7a3548c0e3cd0c3b38135719fcc86b671ba8840 |
|
MD5 | f70c5b6e78540fa9a947907e3e79a45f |
|
BLAKE2b-256 | 9e58db3f76945f0e9b955fdba6bc1e139b83508fd9da490cd27ae0bba48eb916 |
File details
Details for the file pyqt_search_bar-0.0.14-py3-none-any.whl
.
File metadata
- Download URL: pyqt_search_bar-0.0.14-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/0.0.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 516870126b99129420bf054812331458577e0b684addc1fe2e3d63cba89dbed6 |
|
MD5 | 8d237ff33254cee35576350acf683d13 |
|
BLAKE2b-256 | 4efe19df66613942847c308f7db60560449ad86ce2915e977591a2d1a0af5190 |