Format TableViewColumn item text
-
Is there a way to format the text of TableViewColumn bind to a role. I know this can be done by using itemDelegate. Is there are some other way something like this
@ TableView{
model: myObject.getModel();
TableViewColumn{
title: "Customer Name"
role: "customerID"
text: myObject.GetCustomerNameByID(customerID)
}
}@ -
no I think the best solution is to create a custom delegate. Though perhaps it would make sense to have something like a standard TaleViewDelegate{} as part of the API
-
Thank you! Then I think I can handle it form c++ by implementing a model by sub classing QAbstractListModel.
TaleViewDelegate idea is great. I would like to see it on a future version. :)