tags:

views:

23

answers:

1

I have seen examples like this:

self.connect(self.ui.add_button, QtCore.SIGNAL('clicked()'),self.printer)

And examples like this:

self.ui.add_button.clicked.connect(self.printer)

I'm just starting to learn Qt; which one should I focus on?

+3  A: 

I think that the second example is only supported by some Qt versions (the newer ones), while the first it supported by older ones. But, both are correct.

mRt
It was introduced in PyQt 4.5 AFAIK.
Mike Hordecki