PySide/tests/QtDeclarative/bug_557.py
Hugo Parente Lima 6383832408 Fix bug#557 - "Segmentation fault in QDeclarativeComponent.loadUrl()"
The signature QDeclarativeComponent(QObject*) should not exist, it's not
documented and just creates a useless QDeclarativeComponent when used,
useless in the sense that it will segfault when used.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Renato Araújo <renato.filho@openbossa.org>
2011-01-05 14:35:11 -02:00

14 lines
335 B
Python

from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtDeclarative import *
import sys
app = QApplication(sys.argv)
engine = QDeclarativeEngine()
component = QDeclarativeComponent(engine)
# This should segfault if the QDeclarativeComponent has not QDeclarativeEngine
component.loadUrl(QUrl.fromLocalFile('foo.qml'))