Dear All,
I have built python 2.7 and PySide 0.4.0 from source on Fedora 12. I have a strange problem.

The following program:

import sys
from PySide import QtGui

app = QtGui.QApplication(sys.argv)

class AWindow(QtGui.QWidget):
    def __init__(self,parent=None):
        QtGui.QWidget.__init__(self,parent)
        a = QtGui.QAction(self)
        a = QtGui.QAction("hello",self)
        b = QtGui.QWidget(self)

win = AWindow()

gives the error:

Traceback (most recent call last):
  File "jiffy.py", line 13, in <module>
    win = AWindow()
  File "jiffy.py", line 11, in __init__
    b = QtGui.QWidget(self)
SystemError: NULL object passed to Py_BuildValue

However, the following, very similar, program is fine:

import sys
from PySide import QtGui

app = QtGui.QApplication(sys.argv)

class AWindow(QtGui.QWidget):
    def __init__(self,parent=None):
        QtGui.QWidget.__init__(self,parent)
        a = QtGui.QAction(self)
        a.setText("hello")
        b = QtGui.QWidget(self)

win = AWindow()

In fact, any Qt api call after a QAction(text,parent) constructor seems to go wrong, so it seems as though the QAction constructor is doing something bad.

Is this a bug, or should I have used Python 2.6? Or maybe I have used wrong configure/make parameters. Any ideas?

Best Wishes,
Stuart McNicholas
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to