[Interest] problem when inheriting from QQuickItem

Preet prismatic.project at gmail.com
Fri May 10 21:49:28 CEST 2013


Does your item have the QQuickItem::ItemHasContents flag set?
http://qt-project.org/doc/qt-5.0/qtquick/qquickitem.html#Flag-enum


On Fri, May 10, 2013 at 3:10 PM, VStevenP <vstevenpavao at yahoo.com> wrote:

> One minor correction, the import commands should say MyItem, not KItem.
>
> I adjusted the code below accordingly.
>
> I am trying to figure out why my class which inherits from QQuickItem
> won't allow display of other embedded elements in my QML documents.
>
> - VStevenP
>
> --
>
> The following QML document results in the display of the png:
>
> import QtQuick 2.0
> import MyItem 1.0
>
>
> Item{
>     Image{
>         source:"knob.png"
>     }
> }
>
>
> The following QML document results in the png NOT being displayed:
>
> import QtQuick 2.0
> import MyItem 1.0
>
> MyItem{
>     Image{
>         source:"knob.png"
>     }
> }
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130510/17d57605/attachment.html>


More information about the Interest mailing list