PyQt4.QtGui.QApplication.clipboard.text

Here are the examples of the python api PyQt4.QtGui.QApplication.clipboard.text taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

5 Examples 7

Example 1

Project: lknovel Source File: GUIVersion.py
Function: event_filter
    def eventFilter(self, object, event):
        if event.type() == QtCore.QEvent.WindowActivate:
            clipboardText = QtGui.QApplication.clipboard().text()
            totalCheck = re.compile(
                r'^(((http://lknovel.lightnovel.cn/main/vollist/(\d+).html)|(http://lknovel.lightnovel.cn/main/book/(\d+).html))\s*)+$')
            if totalCheck.search(clipboardText):
                self.urlTextEdit.setText(clipboardText)
        return False

Example 2

Project: toxygen Source File: mainscreen_widgets.py
Function: pasteevent
    def pasteEvent(self, text=None):
        text = text or QtGui.QApplication.clipboard().text()
        if text.startswith('file://'):
            self.parent.profile.send_file(text[7:])
        else:
            self.insertPlainText(text)

Example 3

Project: ilastik-0.5 Source File: shellWidget.py
Function: paste
    def paste(self):
        """
        Reimplemented slot to handle the paste action.
        """

        lines = unicode(QtGui.QApplication.clipboard().text())
        self.__executeLines(lines)

Example 4

Project: PyQt4 Source File: textedit.py
Function: clipboarddatachanged
    def clipboardDataChanged(self):
        self.actionPaste.setEnabled(
                len(QtGui.QApplication.clipboard().text()) != 0)

Example 5

Project: ngcccbase Source File: sendcoinspage.py
    def btnPasteClicked(self):
        self.edtAddress.setText(QtGui.QApplication.clipboard().text())