[PyQt] isSystemTrayAvailable() causes segfault

Philip Lorenz lorenzph+sip at in.tum.de
Sun Mar 21 19:23:21 GMT 2010


Have you created a QApplication instance before attempting to call that 
function. I am also running ArchLinux (AMD64) and am only experiencing a 
segfault in XInternAtom () from /usr/lib/libX11.so.6 if a QApplication 
instance does not exist (the segfault also happens when using Qt without 
any bindings at all - so it's probably a bug in Qt itself).

Sample #1 (segfaults):

from PyQt4 import QtGui

QtGui.QSystemTrayIcon.isSystemTrayAvailable()

Sample #2 (does not segfault):

from PyQt4 import QtGui
import sys

app = QtGui.QApplication(sys.argv)
print QtGui.QSystemTrayIcon.isSystemTrayAvailable()


On 03/21/2010 04:03 PM, Dino Krtanjek wrote:
> So I ran the code with the development snapshot of pyqt, version
> 4.7.3. Still no luck. I'm on a 64 bit linux machine (running Arch
> Linux, if that's of any importance). Can someone help?
>
> On Sat, Mar 20, 2010 at 7:28 PM, Dino Krtanjek<krtanjekdino at gmail.com>  wrote:
>    
>> I just updated to python 2.6.5 and still no luck. My Qt version is
>> also 4.6.2. Later I'll try to run it with the latest development
>> snapshots of pyqt and update the thread.
>>
>> On Sat, Mar 20, 2010 at 6:20 PM, Russell Valentine
>> <russ at coldstonelabs.org>  wrote:
>>      
>>> Works fine for me in Qt: 4.6.2, PyQt 4.7, Python: 2.6.4
>>>
>>> On 03/20/10 10:01, Dino Krtanjek wrote:
>>>        
>>>> Hi.
>>>>
>>>> I am trying to use QtGui.QSystemTrayIcon.isSystemTrayAvailable(), but
>>>> every time I run the methon I get a segfault. I'm using python 2.6.4
>>>> with pyqt 4.7.0. Has anybody had the same experience?
>>>> _______________________________________________
>>>> PyQt mailing list    PyQt at riverbankcomputing.com
>>>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>>>          
>>> _______________________________________________
>>> PyQt mailing list    PyQt at riverbankcomputing.com
>>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>>
>>>        
>>      
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt



More information about the PyQt mailing list