semvec/pypi-packages huggingface dataset:
pyqt-search-bar 0.0.14
PyQt search bar
License: MIT


# pyqt-search-bar
PyQt search bar

## Requirements
PyQt5 >= 5.8

## Setup
`python -m pip install pyqt-search-bar`

## Included Packages
* <a href="https://github.com/yjg30737/pyqt-resource-helper.git">pyqt-resource-helper</a>
* <a href="https://github.com/yjg30737/pyqt-svg-button.git">pyqt-svg-button</a>

## 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

```python
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)

![image](https://user-images.githubusercontent.com/55078043/167742517-108289ad-4560-4636-bbcf-f311700c8e06.png)

Search bar which is not empty (search button is enabled)

![image](https://user-images.githubusercontent.com/55078043/167742674-9270435a-18f9-47fb-abf3-9144cb3d5035.png)

See Also
* <a href="https://github.com/yjg30737/pyqt-instant-search-bar">pyqt-instant-search-bar</a> - instant search bar gui
pyqt-svg-label 0.0.13
PyQt QLabel which supports SVG icon
License: MIT


# pyqt-svg-label
PyQt QLabel which supports SVG icon

This is useful to set svg icon.

If you want to use button which supports SVG icon, see <a href="https://github.com/yjg30737/pyqt-svg-icon-pushbutton.git">pyqt-svg-icon-pushbutton</a>.

## Requirements
* PyQt5 >= 5.8

## Setup
`python -m pip install pyqt-svg-label`

## Usage
* `setSvgFile(filename: str)` to set svg file.

## Included Packages
* <a href="https://github.com/yjg30737/absresgetter.git">absresgetter</a>

## Example
Code Sample
```python
from PyQt5.QtWidgets import QLabel, QHBoxLayout, QApplication, QWidget
from pyqt_svg_label import SvgLabel


class IconTitleWidget(QWidget):
    def __init__(self):
        super().__init__()
        self.__initUi()

    def __initUi(self):
        iconLbl = SvgLabel()
        iconLbl.setSvgFile('ico/dark-notepad.svg')

        titleLbl = QLabel()
        titleLbl.setText('Dark Notepad')
        
        # get the point size of the titleLbl's font
        title_lbl_size = titleLbl.font().pointSize()

        # to match the iconLbl's size with titleLbl's font size (usually double size is appropriate)
        iconLbl.setFixedSize(title_lbl_size * 2, title_lbl_size * 2)

        lay = QHBoxLayout()
        lay.addWidget(iconLbl)
        lay.addWidget(titleLbl)

        self.setLayout(lay)


if __name__ == "__main__":
    import sys

    app = QApplication(sys.argv)
    ex = IconTitleWidget()
    ex.show()
    sys.exit(app.exec_())
```

Result

![image](https://user-images.githubusercontent.com/55078043/153744599-c563f628-de57-48b1-941c-5b5f3fe4621c.png)

If `iconLbl.setFixedSize(title_lbl_size * 2, title_lbl_size * 2)` is not included in the code sample, size of svg icon will be adjusted to fit the size of the window.  

## See Also
* <a href="https://github.com/yjg30737/pyqt-svg-icon-text-widget.git">pyqt-svg-icon-text-widget</a>
pyqt-resource-helper 0.0.14
Setting icons, stylesheets of imported packages based on main module to prevent FileNotFoundError
License: MIT


# pyqt-resource-helper
Setting icons, stylesheets of imported packages based on main module's path to prevent FileNotFoundError

## Requirements
PyQt5 >= 5.8

## Setup
`python -m pip install pyqt-resource-helper`

## Usage
```python
# set the icon
PyQtResourceHelper.setIcon([closeBtn], ['ico/close.png']) 
# set the style
PyQtResourceHelper.setStyleSheet([closeBtn], ['style/button.css'])
```