[PyKDE] Dropping SIGNAL() and SLOT() in PyQt4?

Andreas Pakulat apaku at gmx.de
Sun Feb 19 12:49:29 GMT 2006


On 19.02.06 12:23:00, Phil Thompson wrote:
> signature or not. There is no reason why this approach cannot be extended to 
> distinguishing between signals and slots, ie. rely on a slightly slower 
> dynamic lookup rather that the type information SIGNAL() and SLOT() provide.
> 
> (In fact I don't see why Qt still needs SIGNAL() and SLOT() - maybe the speed 
> penalty of the alternative is more an issue at the C++ level.)
> 
> So, what so you think? Is dropping them to much of a cultural change? (Of 
> course they could also be made optional.)

So emit and connect would take just a string as the signal or slot
argument?

I think making them optional is better than dropping, from what I've
read here so far there are people that use documentation for PyQt3 as
basis for learning PyQt4 and this is a major change.

Also then you'd have to change all examples, that may be accomplished by
a simples regexp-search&replace depending on the way it works without
them. The same for all programs out there that already use PyQt4.

So my opinion: Make em optional but clearly document the "other" way and
it's benefits and downsides. Maybe even convert some or all examples to
work without SIGNAL/SLOT.

Andreas

-- 
You have no real enemies.




More information about the PyQt mailing list