Results 1 to 14 of 14

Thread: Nested lists in QT QML

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Join Date
    Aug 2012
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Nested lists in QT QML

    Yes...thank you.
    but now i am using a differnt delegate for that but the lists are overlapping as shown here...http://imgur.com/81NwD
    and also in the inside list only one item is being shown...

    qml code:

    import QtQuick 1.0

    Rectangle {
    width: 360
    height: 360

    ListModel {
    id:model1

    ListElement {
    name: "name"
    }
    ListElement {
    name: "name"
    }
    ListElement {
    name: "name"
    }
    }
    ListModel {
    id:model2
    ListElement {
    name: "inside"
    }
    ListElement {
    name: "inside"
    }
    ListElement {
    name: "inside"
    }
    }

    Component {
    id:delegate2

    Item {
    height: col2.height;

    Column {
    id:col2

    Text {
    id: name1
    text: name
    }

    }
    }
    }

    ListView {
    iduter
    model: model1
    delegate: listdelegate
    }

    Component {
    id:listdelegate

    Item {
    height: col.height

    Column {
    id:col
    Text {
    id:t1
    text: name
    }
    Text {
    id: t2
    text: name
    }
    ListView {
    id:insidelist
    model: model2
    delegate: delegate2
    }
    }
    }
    }
    }
    Last edited by Raghavendra R M; 7th August 2012 at 19:52.

Similar Threads

  1. nested lists in QTextDocumentFragment::toHtml()
    By Al_ in forum Qt Programming
    Replies: 0
    Last Post: 2nd March 2012, 09:16
  2. Inputting Into Lists
    By kiyoutee in forum Newbie
    Replies: 2
    Last Post: 2nd March 2011, 07:48
  3. Hi all, some about lists and views
    By kosasker in forum Newbie
    Replies: 4
    Last Post: 24th January 2011, 12:55
  4. display lists
    By rick_st3 in forum Newbie
    Replies: 3
    Last Post: 22nd June 2008, 23:09
  5. Some problems with lists
    By gdiepen in forum Qt Programming
    Replies: 9
    Last Post: 16th January 2008, 16:54

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.