[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] QApplication.saveStateRequest does not work well with
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2011-05-20 16:14:59
Message-ID: d8c33c50223e6195951f9eb6a631308a () localhost
[Download RAW message or body]

On Fri, 20 May 2011 14:45:35 +0200, Wilbert Berendsen <wbsoft@xs4all.nl>
wrote:
> Hi,
> 
> In my application ("frescobaldi") (using API 2 for QString and
QVariant),
> if qApp is an QApplication(),
> 
> def saveState(sm):
>     pass # code saving state
> 
> qApp.saveStateRequest.connect(saveState)
> 
> yields:
> 
> Object::connect: No such signal
> QApplication::saveStateRequest(QSessionManager)
> Object::connect:  (sender name:   'frescobaldi')
> Traceback (most recent call last):
>   File "./frescobaldi", line 2, in <module>
>     import frescobaldi_app.main
>   File "/home/fede/src/frescobaldi/frescobaldi_app/main.py", line 41, in
> <module>
>     import session          # Initialize QSessionManager support
>   File "/home/fede/src/frescobaldi/frescobaldi_app/session.py", line
> 100, in <module>
>     app.qApp.saveStateRequest.connect(saveState)
> TypeError: connect() failed between saveStateRequest(QSessionManager)
> and unislot()
> 
> So, first QApplication complains, and then PyQt4 errors out.
> 
> On PyQt 4.7 this works well.
> 
> On PyQt4.8 the old way of connecting does work, however:
> 
> QObject.connect(qApp, SIGNAL("saveStateRequest(QSessionManager&)"),
> saveState)
> 
> does work correctly on both PyQt versions (4.7 and 4.8).
> 
> Is this intended?

It's a SIP code generation bug. It's fixed in hg and tonight's snapshot.

Thanks,
Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic