[PyKDE] Auto-connecting Slots

Giovanni Bajo rasky at develer.com
Sat Jan 28 15:27:07 GMT 2006


Phil Thompson <phil at riverbankcomputing.co.uk> wrote:

>> You can put it within the QtCore namespace, but please consider that many
>> people *will* use "from QtCore import *", as it's the default way to make
>> the code similar to the C++ counterpart. If Trolltech added a
"signature()"
>> function, people would complain. Trolltech doesn't use standard C++
>> namespaces, but they have their own namespace: they prefix every class
name
>> with uppercase Q, and every function name with lowercase q. This is why I
>> think PyQt is going the wrong way if it starts suggesting to explicitally
>> use QtCore before everything and/or makes it harder for people to use the
>> "from QtCore import *" form.
>>
>> So, if you're going to add a PyQt-specific name, please make it follow
the
>> Trolltech's convention. QtCore.qSignature would surely be better (there
are
>> pre cedence of global functions named qFooBar in Qt's API).
>
> Trolltech are much more likely to add a function called qSignature() than
> one called signature(). Isn't calling it pyqtSignature() the safest and
most
> consistent?

Right. pyqtSignature() is perfect, thanks!
-- 
Giovanni Bajo




More information about the PyQt mailing list