Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Which is the right way to implement to show emp data on qml
I have emp data in model. (name, age, manger,grade).
I want to show this information in GUI like rows wise. When model added/deleted new emp, should get update on gui. And, sorting also required when click on particular field.
GridView or ListView.
Any suggestions are welcome.
What is emp ? You should be clear when asking a question.
I think a more suitable option would be to use TableView.
I mean, emp means employee data. Here, I want to display each row information in customized view (fields without separator, text with specific fonts). Will Treeview supports this?
TreeView is not yet implemented in QML. Did you check TableView ?
I thought TableView only. But, I mistakenly mentioned TreeView.
I had gone through http://qt-project.org/doc/qt-5/qml-qtquick-controls-tableview.html#details. But, I didn't find information about how to customize view with TreeView.
I have to display in customized view for row(TableView Element on GUI). The row view is with white background, no seperators, have to add other qml gui elements.
Check "this":http://qt-project.org/doc/qt-5/qtquickcontrols-tableview-example.html example. It displays Rows, SortIndicator, Headers etc..
You can use delegates to customize rows.
Thank you. I understand that example.
I don't want to show standard tableview.
I have created a component which will have labels, checkboxes, button, busyindicator. This is equal to one TableViewElement (employeename, age, manager, grade, workingstatus). These controls mapped to model data.
I want to show these components on GUI.
@empname age manger grade busyindicator button checkbox
Row1 --> Loader(Component with Row1 Details) --> this is customized view
Row2 --> Loader(Component with Row2 Details) --> this is customized view
Row1 --> Loader(Component with Row3 Details) --> this is customized view
Row1 --> Loader(Component with Row4 Details) --> this is customized view
Can I achieve this with TableView?
I think yes. Set a custom delegate using "itemDelegate":http://qt-project.org/doc/qt-5/qml-qtquick-controls-tableview.html#itemDelegate-prop
Thank you so much. Let me try.