Created
March 21, 2017 15:41
-
-
Save Siecje/ae3f033daca3cfb52d8060dde2a08b91 to your computer and use it in GitHub Desktop.
Wierd PyQt5 Abort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(venv) ~ $ python whyAbort.py | |
fish: Job 4, “python whyAbort.py” terminated by signal SIGSEGV (Address boundary error) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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