[Interest] problem when inheriting from QQuickItem

VStevenP vstevenpavao at yahoo.com
Fri May 10 20:59:09 CEST 2013


I'm having difficulty fully using a very simple class I wrote which inherits from QQuickItem.  I'm using Qt 5.0.0 on Win7 32-bit.

I've exposed my class to QML, and I'm able to use it in my QML documents, but if I embed any visible objects, they won't display.

The following QML document results in the display of the png:

importQtQuick2.0
importKItem1.0

Item{
Image{
source:"knob.png"
}
}

The following QML document results in the png NOT being displayed:

importQtQuick2.0
importKItem1.0

MyItem{
Image{
source:"knob.png"
}
}

The MyItem class is very simple.  It just inherits from QQuickItem and adds one property to it.  I expose it to QML in the normal way and can use it in my QML documents.

Can someone explain why Images and other visible objects will not display when nested in MyItem?  I can't find this bug listed in the JIRA system, so I thought I'd ask here first to see if there's something I'm missing.

 - VStevenP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130510/7fc2432c/attachment.html>


More information about the Interest mailing list