PyQT signals with arguments

so , here a snippet on how to use the different types of signals in PyQt:

  • connect a signal from C++
    QObject.connect(self.sender, SIGNAL("signalName( Arg1TYPE, Arg2TYPE )"), self.slot)
  • connect a signal from Python
    QObject.connect(self.sender, SIGNAL("signalName" ), self.slot )
  • emit a signal in Python
    self.emit( SIGNAL( "signalName" ), arg1, arg2 )
  • emit a signal in c++
    emit signalName( arg1, arg2 );

more: http://www.eurion.net/python-snippets/snippet/Connecting%20signals%20and%20slots.html

Tagged with:
Posted in C++, Python

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>