[Qgis-developer] Value Tool does not work on 1.3.0

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Sat Sep 19 04:28:45 EDT 2009


On Sat, Sep 19, 2009 at 1:24 AM, Jürgen E. <jef at norbit.de> wrote:

> Sorry, but connect() returns whether or not the connect was successful.  See
> http://doc.trolltech.com/4.5/qobject.html#connect:
>
>> bool QObject::connect ( const QObject * sender, const char * signal, const
>> QObject * receiver, const char * method, Qt::ConnectionType type =
>> Qt::AutoConnection )   [static]
>
>> Creates a connection of the given type from the signal in the sender object
>> to the method in the receiver object. Returns true if the connection
>> succeeds; otherwise returns false.

 Maybe Qt does, but PyQt doesnt :) If I connect to a non-existent
signal I get True returned. Stick this in a Qgis Python console:

from PyQt4.QtCore import *
def foo():   return
z = QObject.connect(iface,SIGNAL("fnord()"),foo)
print z

This is on Qgis 1.3.0, Qt is 4.3.4 from qVersion(). I've found someone
getting an unknown signal error in PyQt but that message was from 2003
and looked like Qt3.

Barry


More information about the Qgis-developer mailing list