[PyQt] Segmentation fault with addLayout

Filip Gruszczyński gruszczy at gmail.com
Sat Aug 16 15:40:57 BST 2008


Hello! I have following code:

from PyQt4.QtGui import *
from PyQt4.QtCore import *

import sys

class Editor(QWidget):
	
	def __init__(self, parent = None):
		QWidget.__init__(self, parent)
		self.setLayout(QVBoxLayout())
		self.layout().addLayout(QVBoxLayout())
				
app = QApplication(sys.argv)
editor = Editor()
editor.show()
sys.exit(app.exec_())

Running it causes Segmentation fault in line:

self.layout().addLayout(QVBoxLayout())

Tried also running it like this:

self.setLayout(QVBoxLayout(self))

But doesn't help. I have recently done large software updgrade (I am
using Gentoo Linux distro) and then everything started to fail (even
my apps, that were working just fine before). I tried to reinstall qt
and PyQt, but that didn't help. Any idea what might be wrong?

I am using: PyQt  4.3.3, qt 4.3.3 and python Python 2.5.2. I'd really
appreciete some help.


-- 
Filip Gruszczyński



More information about the PyQt mailing list