[Qgis-developer] Signals

Martin Dobias wonder.sk at gmail.com
Mon Aug 1 15:27:27 EDT 2011


Hi Quinton

On Fri, Jul 29, 2011 at 3:27 PM, Quinton Erasmus <qcerasmus at gmail.com> wrote:
> I've been having a lot of problems sending signals from python to C++,
> can anyone please just give me some sort of example on how they did
> it. The main thing I want to do is send points from a gui to a custom
> C++ class...

What exactly is your setting? GUI is written in python and you want to
pass points from there to a c++ class? Is that a QObject descendant
and do you have a reference to it in python? How do you declare the
slot in the c++ class? In case you use custom types for signals/slots
do not forget to call qRegisterMetaType() before connecting. It would
be better to start with a simple case - make sure that sending a
signal without parameters works.

Martin


More information about the Qgis-developer mailing list