Re: [PyQt] New style signals question

2010-08-21 Thread Phil Thompson
On Wed, 11 Aug 2010 18:28:45 +0200, Detlev Offenbach det...@die-offenbachs.de wrote: Hi, In my old code I have QTimer code like QTimer.singleShot(0, self, SIGNAL(metaDataChanged())) How do I convert this to the new style signals code? I tried QTimer.singleShot(0, self.metaDataChanged)

Re: [PyQt] New style signals question

2010-08-13 Thread Algis Kabaila
Thanks for posting it to the list - I've learned something from it! OldAl. On Thursday 12 August 2010 19:22:01 Detlev Offenbach wrote: Hi, thanks. That was the solution. Detlev On Donnerstag, 12. August 2010, 机械唯物主义 : linjunhalida wrote: It works! from PyQt4.QtCore import *

Re: [PyQt] New style signals question

2010-08-12 Thread Detlev Offenbach
Hi, thanks. That was the solution. Detlev On Donnerstag, 12. August 2010, 机械唯物主义 : linjunhalida wrote: It works! from PyQt4.QtCore import * from PyQt4.QtGui import * class P(QPushButton): pass app = QApplication([]) p = P() p.clicked.connect(app.aboutQt) p.show()

Re: [PyQt] New style signals question

2010-08-11 Thread Algis Kabaila
On Thursday 12 August 2010 02:28:45 Detlev Offenbach wrote: Hi, In my old code I have QTimer code like QTimer.singleShot(0, self, SIGNAL(metaDataChanged())) How do I convert this to the new style signals code? I tried QTimer.singleShot(0, self.metaDataChanged) but this threw an

Re: [PyQt] New style signals question

2010-08-05 Thread Phil Thompson
On Wed, 04 Aug 2010 20:33:24 +0100, Baz Walter baz...@ftml.net wrote: On 04/08/10 20:25, Phil Thompson wrote: On Wed, 04 Aug 2010 20:20:11 +0100, Baz Walterbaz...@ftml.net wrote: On 04/08/10 20:07, Phil Thompson wrote: Specific overloads are obtained by indexing the bound signal with the

[PyQt] New style signals question

2010-08-04 Thread detlev
Hi, in my code I have a line like act.triggered.connect(self.myslot) The slot has a method signature like def myslot(self, fn = None, foo = bar): However, it is always called with fn set to False. It seems that triggered(bool) is the default signal. How do I get my slot connected to the

Re: [PyQt] New style signals question

2010-08-04 Thread Baz Walter
On 04/08/10 18:50, detlev wrote: in my code I have a line like act.triggered.connect(self.myslot) The slot has a method signature like def myslot(self, fn = None, foo = bar): However, it is always called with fn set to False. It seems that triggered(bool) is the default signal. How do I get

Re: [PyQt] New style signals question

2010-08-04 Thread Phil Thompson
On Wed, 4 Aug 2010 19:50:54 +0200, detlev det...@die-offenbachs.de wrote: Hi, in my code I have a line like act.triggered.connect(self.myslot) The slot has a method signature like def myslot(self, fn = None, foo = bar): However, it is always called with fn set to False. It seems

Re: [PyQt] New style signals question

2010-08-04 Thread Baz Walter
On 04/08/10 20:07, Phil Thompson wrote: Specific overloads are obtained by indexing the bound signal with the signature you want, so... act.triggered[()].connect(self.myslot) can you explain why i see errors like this when using that syntax: File menusys.py, line 1522, in __init__

Re: [PyQt] New style signals question

2010-08-04 Thread Phil Thompson
On Wed, 04 Aug 2010 20:20:11 +0100, Baz Walter baz...@ftml.net wrote: On 04/08/10 20:07, Phil Thompson wrote: Specific overloads are obtained by indexing the bound signal with the signature you want, so... act.triggered[()].connect(self.myslot) can you explain why i see errors like this

Re: [PyQt] New style signals question

2010-08-04 Thread Baz Walter
On 04/08/10 20:25, Phil Thompson wrote: On Wed, 04 Aug 2010 20:20:11 +0100, Baz Walterbaz...@ftml.net wrote: On 04/08/10 20:07, Phil Thompson wrote: Specific overloads are obtained by indexing the bound signal with the signature you want, so... act.triggered[()].connect(self.myslot) can