from PyQt5 import QtWidgets
from PyQt5.QtGui import QClipboard, QGuiApplication
text = QClipboard.text(QClipboard.Clipboard)
和錯誤信息:
TypeError: arguments did not match any overloaded call:
QClipboard.text(QClipboard.Mode mode=QClipboard.Clipboard): first argument of unbound method must have type 'QClipboard'
QClipboard.text(str, QClipboard.Mode mode=QClipboard.Clipboard) -> (str, str): first argument of unbound method must have type 'QClipboard'
我想寫可以管理我的OS剪貼板中的數據的程序。
我應該如何處理這個錯誤?
我改變了這樣的代碼:'mode = QClipboard.Clipboard text = QClipboard.text(mode = mode)',但也得到相同的錯誤 – LWH