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

List:       pykde
Subject:    Re: [PyKDE] qApp is a QApplication instance
From:       "Phil Thompson" <phil () riverbankcomputing ! co ! uk>
Date:       2005-03-21 17:01:48
Message-ID: 36813.82.68.80.137.1111424508.squirrel () river-bank ! demon ! co ! uk
[Download RAW message or body]

> Phil Thompson <phil@riverbankcomputing.co.uk> wrote:
>
>>>> No it isn't - sip.cast()
>>>
>>> What would the correct syntax would be, then?
>>>
>>> def pyApp():
>>>     import sip
>>>     return sip.cast(qApp, App)
>>>
>>> gives me a:
>>>
>>> SystemError: error return without exception set
>>
>> That's the correct syntax. I assume that you have called the App ctor by
>> the time you call pyApp(). If so, can you put together a small, complete
>> example?
>
> Well, it doesn't even pass the basic sanity check:
>
>>>> from qt import *
>>>> class App(QApplication):
> ...     pass
> ...
>>>> a = App([])
>>>> qApp
> <qt.QApplication object at 0x0080DCF0>
>>>> import sip
>>>> sip.cast(qApp, App)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> SystemError: error return without exception set
>
> I speculate this got broken when you touched exception support in sip 4.2?

Forget my previous reply - old habits.

What if you pass "a" rather than "qApp" to cast()?

Phil

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

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