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
3
Example 1
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
3
Example 2
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)
3
Example 3
def paste(self):
"""
Reimplemented slot to handle the paste action.
"""
lines = unicode(QtGui.QApplication.clipboard().text())
self.__executeLines(lines)
0
Example 4
def clipboardDataChanged(self):
self.actionPaste.setEnabled(
len(QtGui.QApplication.clipboard().text()) != 0)
0
Example 5
Project: ngcccbase Source File: sendcoinspage.py
def btnPasteClicked(self):
self.edtAddress.setText(QtGui.QApplication.clipboard().text())