[PyQt] Segmentation fault with addLayout
Phil Thompson
phil at riverbankcomputing.com
Sat Aug 16 15:51:49 BST 2008
On Sat, 16 Aug 2008 16:40:57 +0200, "Filip Gruszczyński"
<gruszczy at gmail.com> wrote:
> 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.
Works fine for me.
Phil
More information about the PyQt
mailing list