Fatal Python error: Segmentation fault for PyQt ui

2019-09-17 07:25发布

问题:

I find a segmentation fault on machine 1 with centOS 6.6 when I run the following:

>>> from PyQt4 import QtCore, QtGui
>>> QtGui.QPen(QtGui.QColor("#7F462C"),2,QtCore.Qt.DotLine)

but it works fine on machine 2 with centOS 6.5 with same version of python3 pyqt4(4.9.6) and qt(4.7.1)

gdb gives me the following:

Program received signal SIGSEGV, Segmentation fault.
0x000000b400000229 in ?? ()

Although there is no segmentation fault when I change the line to this:

>>> QtGui.QPen(QtGui.QColor(127,70,44),2,QtCore.Qt.DotLine)
标签: python qt pyqt4