Beispiel #1
0
    def __on_help_request(self):
        """
        Help shortcut was pressed. We send a `QWhatsThisClickedEvent` to
        the scheme and hope someone responds to it.

        """
        # Sender is the QShortcut, and parent the OWBaseWidget
        widget = self.sender().parent()
        try:
            node = self.node_for_widget(widget)
        except KeyError:
            pass
        else:
            qualified_name = node.description.qualified_name
            help_url = "help://search?" + urlencode({"id": qualified_name})
            event = QWhatsThisClickedEvent(help_url)
            QCoreApplication.sendEvent(self.scheme(), event)
 def __init__(self, href, url):
     QWhatsThisClickedEvent.__init__(self, href)
     self.__url = QUrl(url)
Beispiel #3
0
 def __init__(self, href, url):
     QWhatsThisClickedEvent.__init__(self, href)
     self.__url = QUrl(url)
Beispiel #4
0
 def test_help_requests(self):
     w = self.w
     ev = QWhatsThisClickedEvent('help://search?id=one')
     QApplication.sendEvent(w, ev)