Reading some Python (PyQt) code, I came across as follows.
@pyqtSignature("QString")
def on_findLineEdit_textEdited(self, text):
self.__index = 0
self.updateUi()
How does this @pyqtSignature work? How Python treat this @?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is the decorator syntax, simply it is equivalent to this form:
Really simple.
A typical decorator takes as the first argument the function that has to be decorated, and perform stuff/adds functionalities to it. A typical example would be:
The steps are:
f