View Single Post
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#4
I'm still having problems. The index set for 0 solves one the problem of a blank label, but
With this code:
Code:
import QtQuick 1.0
import org.maemo.fremantle 1.0
Rectangle
{
    property color fontcolor: "white"
    Column
    {
        id: c1
        Row
        {
            width: parent.width
            CheckBox
            {
                id: tracksrc
                //text: "Select track from library"
                checked: true
                //checkable: true
            }
            Label
            {
                id: tracksrcText
                text: "Select track from library"
                anchors.verticalCenter: tracksrc.verticalCenter
                color: fontcolor
            }
        }

        Label
        {
            id: selecttracklabel
            text: "Selected track"
            color: fontcolor
        }
        Button
        {
            id: selecttrack
            text: "No track selected"
            checkable: false
            width: parent.width
        }
    }
    Rectangle
    {
        id: r1
        anchors.top: c1.bottom
        SelectionDialog
        {
            id: lyricssrcdialog
            titleText: "Download source"
            selectedIndex: 0
            model: ListModel
            {
                ListElement { name: "AZLyrics" }
            }
        }
        Button
        {
            id: lyricssrcbutton
            text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name
            width: parent.width
            onClicked: { lyricssrcdialog.open(); }
        }
    }
    Column
    {
        id: c2
        anchors.top: r1.bottom
        Button
        {
            id: go
            text: "Go!"
            width: parent.width
        }
    }
}
There's only black, blank screen showing up. If only the selectedIndex property is changed:
Code:
import QtQuick 1.0
import org.maemo.fremantle 1.0

Column
{
    property color fontcolor: "white"
    Row
    {
        width: parent.width
        CheckBox
        {
            id: tracksrc
            //text: "Select track from library"
            checked: true
            //checkable: true
        }
        Label
        {
            id: tracksrcText
            text: "Select track from library"
            anchors.verticalCenter: tracksrc.verticalCenter
            color: fontcolor
        }
    }

    Label
    {
        id: selecttracklabel
        text: "Selected track"
        color: fontcolor
    }
    Button
    {
        id: selecttrack
        text: "No track selected"
        checkable: false
        width: parent.width
    }

    SelectionDialog
    {
        id: lyricssrcdialog
        titleText: "Download source"
        selectedIndex: 0
        model: ListModel
        {
            ListElement { name: "AZLyrics" }
        }
    }
    Button
    {
        id: lyricssrcbutton
        text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name
        width: parent.width
        onClicked: { lyricssrcdialog.open(); }
    }

    Button
    {
        id: go
        text: "Go!"
        width: parent.width
    }
}
then it's showing up alright, but throwing that load of loops detected as before. Where should I move the selection dialog?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here