Skip to content

hahn-kev/QmlGrid

Repository files navigation

QmlGrid

DataTable.qml has the main control, it depends on a couple other files.

Some examples are shown in ExampleGrid1.qml and AdvancedExample.qml

Simple grid

image

DataTable {
    id: tableId
    columns: [
        {name:"name", label: "First Name", type:"string"},
        {name:"lastName", label: "Last Name", type:"string"},
        {name:"age", type:"number"},
    ]
    rows: [
        {lastName: "Bobberson", name:"bob", age: 4}, 
        {lastName: "be", name: "jo", age: 6},
        {lastName: "ington", name: "Alex", age: 50},
        {lastName: "Butterfly", name: "Rebekah", age: 22},
    ]
    onColumnHeaderClicked: {
        print("sorting column: " + column.name);
    }
    onCellClicked: print("clicked cell:" + column.name + "|" + row.name)
}

Advanced grid

image

About

This is a QML Data grid using Qt Quick Controls 2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published