Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageStack: add an option to search for an url #4188

Open
payno opened this issue Oct 27, 2024 · 0 comments
Open

ImageStack: add an option to search for an url #4188

payno opened this issue Oct 27, 2024 · 0 comments
Assignees

Comments

@payno
Copy link
Member

payno commented Oct 27, 2024

It would be nice to have a search bar associated to the UrlList.

Something like:

    def __init__(self):
        ...

        self._searchWidget = qt.QLineEdit(parent=self)
        self._searchWidget.setPlaceholderText("search")
        search_icon = icons.getQIcon("search")
        self._searchWidget.addAction(search_icon, qt.QLineEdit.LeadingPosition)
        ...
        self._searchWidget.textChanged.connect(self._filterUrlList)
       ...

    def _filterUrlList(self, *args, **kwargs):
        """Filter the url list according to the 'searchWidget'"""
        filter_str = self._searchWidget.text()
        filter_str = filter_str.lstrip(" ").rstrip(" ")
        for item_index in range(self._urlsTable.count()):
            item = url_list.item(item_index)
            item.setHidden(filter_str not in item.text())
@payno payno self-assigned this Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant