hi,
i have created array using javascript and stored some data ..i want to view this data in row and column like table view for my qml screen...please suggest any ideas...
Printable View
hi,
i have created array using javascript and stored some data ..i want to view this data in row and column like table view for my qml screen...please suggest any ideas...
Use the ListView element.
Due to the fact, QML has no TableView, the best way is to use a ListView and a delegate, which is showing it like a table. Depending on your data you can also create some Roles, to show the data.
AlphaX2
Qt5.1 beta provide us tableView
Code:
import QtQuick 2.0 import QtQuick.Controls 1.0 Rectangle { width: 640 height: 480 ListModel { id: libraryModel ListElement{ title: "A Masterpiece" ; author: "Gabriel" } ListElement{ title: "Brilliance" ; author: "Jens" } ListElement{ title: "Outstanding" ; author: "Frederik" } } TableView { anchors.fill: parent TableViewColumn{ role: "title" ; title: "Title" ; width: 100 } TableViewColumn{ role: "author" ; title: "Author" ; width: 200 } model: libraryModel } }
This is the example from the QtDocument
ya thanks to all i got output...i am using listview ...thanks u very much.....
i have created Qt c++ database ...i maintain some peoples data's...i also displayed this data to qml screen..in qml screen i have search option(textinput and button) .....whenever i click this search button with textinput name,it will retrieve and displayed how many same name persons in the table...now my questions this same name persons place i want to click and get that particular names data's ....how can i do i don't know please provide some solutions ....