Thanks, I created http://bugreports.qt.nokia.com/browse/QTBUG-15695.

Girish

On Mon, Nov 29, 2010 at 3:57 PM,  <aaron.kenn...@nokia.com> wrote:
> Hi,
>
> Sounds like a bug to me - please file a bug report.
>
> Cheers,
>
> Aaron
>
> On 29/11/2010, at 7:39 PM, "ext Girish Ramakrishnan" <gir...@forwardbias.in> 
> wrote:
>
>> Hi,
>> QDeclarativeView::setObjectOwnership doesn't seem to be working as I
>> would expect. Maybe I am reading the documentation wrong.
>>
>> In essence, I have a
>> Q_INVOKABLE QObject *create() {
>>    Object *o = new Object;
>>    o->setObjectName("object x");
>>    QDeclarativeEngine::setObjectOwnership(o, 
>> QDeclarativeEngine::CppOwnership);
>>    return o;
>> }
>>
>> I call the above function from QML and despite the ownership being set
>> to CppOwnership, the above objects gets deleted anyway.
>>
>> If you want full compilable code, it's here -
>> http://pastebin.com/ffqmxHy6. Keep clicking on the rectangle to create
>> new objects. Then close the app, all the created objects gets deleted
>> (I thought setting CppOwnership will make qml not delete the objects).
>>
>> Girish
>> _______________________________________________
>> Qt-qml mailing list
>> Qt-qml@trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-qml
>

_______________________________________________
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to