Detailed Description

 rowCount() function returns the total number of items in the model.

The columnCount() function is implemented for interoperability with all kinds of views, but by default informs views that the model contains only one column.



If your model is used within QML and requires roles other than the default ones provided by the roleNames() function, you must override it.


An insertRows() implementation must call beginInsertRows() before inserting new rows into the data structure, and it must call endInsertRows() immediately afterwards.

A removeRows() implementation must call beginRemoveRows() before the rows are removed from the data structure, and it must call endRemoveRows() immediately afterwards.

Note: Some general guidelines for subclassing models are available in the Model


6. Model-View-Delegate

원문 https://qmlbook.github.io/en/ch06/index.html



주의점 

 QAbstractListModel 을 상속 받아서 클래스를 만들경우 rowCount() 와 data() 함수를 만든다.




단어

one-dimensional - 1차원의 , 깊이가 없는

non-hierarchical

'Qt' 카테고리의 다른 글

QQuickView 옵션  (0) 2015.10.26
다국어처리  (0) 2015.10.26
Embedding C++ Objects into QML with Context Properties[26]  (0) 2015.10.26
Interacting with QML Objects from C++[10_25]  (0) 2015.10.25
Property Value Initialization Semantics[10_23]  (0) 2015.10.23

+ Recent posts