summaryrefslogtreecommitdiff
path: root/src/components/qt_hmi/References/Look/Layouts/ListLayout.qml
blob: 326d4feb0b78845f8cfdcba687609cb1b476b8d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import QtQuick 2.0
import com.ford.hmiframework 1.0
import "../Widgets"


FLayout {

    id: theLayout
    width: 800
    height: 480
    x:10
    y:10
    property alias list : theListView
    property alias list_itemWidget: theListView.itemWidget
    property alias list_data: theListView.data
    Rectangle{
        anchors.fill:parent
        color:"white"

    }


    FWdgtListView {

        id: theListView
        anchors.fill: parent
        clip: true

    }
    FWdgtListView {
        x:400
        id: filteredListView
        clip: true
        data:filtermodel
        itemWidget:list_itemWidget
        width:100
        height:400
    }
    TextInput{
        text:"HelloWorld"
        x:200
        y:20
        onTextChanged: {

            if(text.length > 0 ) {
                            dataPool.filter = text
                console.log(dataPool.filter)

                            sortList.fillFilterModel(theListView.data)//Just backup original
                            sortList.updateFilterModel(text)

                        } else {
                            sortList.fillFilterModel(theListView.data)
                        }
        }

    }

}