Python 2.6
PYQT 4.5.4
OS: Windows

I ran into this problem today and noticed someone mentioned it was seg
faulting on Linux. I guess maybe it was fixed on Linux but not on Windows?
Same problem, If I add self before the spacer variable it works.

Test Code is attached

---

thnx
from PyQt4 import QtCore, QtGui
import sys

app = QtGui.QApplication(sys.argv)


class TestWidget(QtGui.QWidget):

	def __init__(self, parent=None):
		QtGui.QWidget.__init__(self, parent)

		self.hLayout = QtGui.QHBoxLayout()  

		spacer = QtGui.QSpacerItem(5,5)

		self.hLayout.addSpacerItem(spacer) 

		self.setLayout(self.hLayout)
	

widget = TestWidget()
widget.show()

sys.exit(app.exec_())
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to