Skip to content

Instantly share code, notes, and snippets.

@Siecje
Created March 21, 2017 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Siecje/ae3f033daca3cfb52d8060dde2a08b91 to your computer and use it in GitHub Desktop.
Save Siecje/ae3f033daca3cfb52d8060dde2a08b91 to your computer and use it in GitHub Desktop.
Wierd PyQt5 Abort
(venv) ~ $ python whyAbort.py
fish: Job 4, “python whyAbort.py” terminated by signal SIGSEGV (Address boundary error)
#!/usr/bin/env python
import sys
from PyQt5 import Qt, QtCore, QtGui, QtQml, QtWidgets
class OutputType(QtCore.QObject):
pass
QML = b"""
import QtQuick 2.7
import OutputType 1.0
Item {
OutputType {
function getQueryFilter(){
var filters = [];
}
}
}
"""
app = QtWidgets.QApplication(sys.argv + ["-nograb"])
QtQml.qmlRegisterType(OutputType, 'OutputType', 1, 0, 'OutputType')
engine = QtQml.QQmlApplicationEngine()
engine.loadData(QML)
sys.exit(app.exec_())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment