Ejemplo n.º 1
0
    def prepareContextMenu(self, menu):
        HtmlTemplateHandler.prepareContextMenu(self, menu)
        menu.addAction("Dereference %s" % self.varWrapper.getExp(), self.dereference)
        submenu = menu.addMenu("Show custom...")

        # we cannot construct the lineedit in our ctor since it will be automatically deleted once the menu is closed
        self.showCustomEdit = QLineEdit()
        self.showCustomEdit.returnPressed.connect(self.showCustom)
        self.showCustomEdit.setText("*(%s)" % self.varWrapper.getExp())
        we = QWidgetAction(menu)
        we.setDefaultWidget(self.showCustomEdit)
        submenu.addAction(we)
Ejemplo n.º 2
0
 def prepareContextMenu(self, menu):
     HtmlTemplateHandler.prepareContextMenu(self, menu)
     filters.add_actions_for_all_filters(menu.addMenu(QIcon(":/icons/images/filter.png"), "Set Filter for %s..." % self.varWrapper.getExp()), self.varWrapper)