On Mon, 2011-11-07 at 17:42 -0300, Marcelo Lira wrote: > About your problem, it seems like a bug. Please send us a small piece > of code that we may run and find where the problem is. > Attached are fairly minimal set of files that uses QDeclarativeView as I am. It may be that I need not register the new type, but I include it as indicative of how its being used.
Thanks, Henry
#!/usr/bin/env python from PySide import QtDeclarative from PySide.QtGui import QApplication import sys class DummyItem(QtDeclarative.QDeclarativeItem): pass app = QApplication(sys.argv) view = QtDeclarative.QDeclarativeView('demo.qml') view.show() # Set up the QDeclarativeItem QtDeclarative.qmlRegisterType(DummyItem, "DummyItem", 1, 0, "DummyItem") dummy_item = QtDeclarative.QDeclarativeComponent(view.engine(),\ "DummyItem.qml").create() # THIS LINE FAILS dummy_item.setParentItem(view.rootObject()) app.exec_()
import QtQuick 1.0 Rectangle { color: "red" width: 100 height: 100 }
import QtQuick 1.0 import DummyItem 1.0 DummyItem { anchors.fill: parent }
_______________________________________________ PySide mailing list PySide@lists.pyside.org http://lists.pyside.org/listinfo/pyside