[SailfishDevel] Does BackgroundItem not accept all elements?

Gabriel Böhme m.gabrielboehme at googlemail.com
Wed Jan 22 10:48:38 UTC 2014


Hi sailors,

I have a ListView and want to create a delegate for it. So I use the
BackgroundItem as Silica Documentation recommend, but it seems, that the
BackgroundItem is not accepting all elements.

Easy example:

BackgroundItem {
    id: background

    highlightedColor: Theme.secondaryHighlightColor

    onClicked: {
        console.log("clicked: "+index)
    }

    Column {
        id: background_content

        spacing: Theme.paddingSmall
        width: parent.width

        TextEdit {
            text: tmdb_title
            color: Theme.highlightColor
            font.pixelSize: Theme.fontSizeMedium
            wrapMode: TextEdit.Wrap
            readOnly: true
        }
        Label {
            text: "Released: "+tmdb_release_date
            color: Theme.primaryColor
            font.pixelSize: Theme.fontSizeMedium
        }
        Separator {
            width: parent.width
            color: Theme.highlightColor
        }
    }

In this case the BackgroundItem just accepts the TextEdit and the Label,
but not the Separator. Which can be seen by clicking it. Setting the
contentHeight, does not change this behavior, it's just results in not
showing the highlighted color anymore.

Do I miss something? Whats wrong here? 

Thanks, Gabriel.





More information about the Devel mailing list