Searchable Menu Action
Searchable Menu Menu
Searchable QMenu
men = SearchableMenu(objectName="test", title="test menu")
subMenu = men.addMenu("helloworld")
act = taggedAction.TaggedAction("test")
act.tags = set(["test", "hello", "world"])
a = taggedAction.TaggedAction("bob")
a.tags = set(["bob"])
subMenu.addAction(act)
men.addAction(a)
men.exec_(QtGui.QCursor.pos())
- class SearchableMenu(*args: Any, **kwargs: Any)
Bases:
MenuExtended the standard QMenu to make it searchable, first action is always a lineedit used to recursively search all sub actions by tags
- showEvent(event)
Set the search visible or not
- Returns:
- Return type:
- setSearchVisible(visible)
Set visibility of the search edit
- Parameters:
visible
- Returns:
- searchVisible()
Returns visibility of search edit
- Returns:
- updateSearch(searchString=None)
Function that will search all actions for a search string tag
- Parameters:
searchString (str) – tag names separated if a space eg. “my tag”
- clear()
Clear all items from menu
- Returns: