title: How to use @pyqtSlot decorator with other decorators in QML?
body: <p><strong><em>SOLVED:</strong> See my answer below. I cannot accept for 2 days.</em></p>
  
  <p>I have a Python object derived from QObject whose methods I call from QML. These methods are of course decorated with <strong>@pyqtSlot</strong>. However, there is a problem when I try to combine with my own decorators like so:</p>
  
  <pre><code>@pyqtSlot()
  @decorator
  def call(self):
      print('Called!')
  </code></pre>
  
  <p>I get the error <code>file:X.qml:99: TypeError: Property 'call' of object X(0x7fed4c07fa50) is not a function</code></p>
  
  <p>This is the decorator I am using: </p>
  
  <pre><code>def decorator(f):
      def wrapped(self):
          print('get decorated')
          return f(self)
      return wrapped
  </code></pre>
  
  <p>Could anyone clarify why this doesn't work? Some behavior of PyQt? Or am I doing something wrong?</p>
  
  <p><strong><em>NOTE:</strong> It will work if the decorator simply returns</em> <code>f</code><em>, the problems are when the decorator returns a nested function such as</em> <code>wrapped</code><em>.</em></p>