On Tue, 2011-11-08 at 11:13 +0000, Henry Gomersall wrote: > 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.
This bug showed up after commit 3a4369cf80199d5ab0dd1b5bf80a81abe10902e7 to fix bug 925. Reverting the commit unbreaks my test case, but triggers 925 again. Which is the easier bug to work around? Any help is appreciated. I've reattached the test case. 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