def contextMenu(self, menu, items=None): """ This method is called when the user right clicks on this item. :type menu: QtWidgets.QMenu :type items: list[TransferItem] :rtype: None """ import setsmenu action = setsmenu.selectContentAction(self, parent=menu) menu.addAction(action) menu.addSeparator() subMenu = self.createSelectionSetsMenu(menu, enableSelectContent=False) menu.addMenu(subMenu) menu.addSeparator()
def contextMenu(self, menu, items=None): """ This method is called when the user right clicks on this item. :type menu: QtWidgets.QMenu :type items: list[BaseItem] :rtype: None """ import setsmenu action = setsmenu.selectContentAction(self, parent=menu) menu.addAction(action) menu.addSeparator() subMenu = self.createSelectionSetsMenu(menu, enableSelectContent=False) menu.addMenu(subMenu) menu.addSeparator() studiolibrary.LibraryItem.contextMenu(self, menu, items=items)