Hey Peter, 2011/8/4 Peter Wood <[email protected]>: > I have been fighting with this for a few days now. I am trying to > implement a WAbstractItemModel class. In the end the backend will be a > database with large amounts of data. > Most of the implementation details are inspired by the > WStandardItemModel implementation.
You could also take inspiration from the Dbo/QueryModel which is more simple and perhaps closer to your end goal (loading data on-demand from a database) ? Also, WAbstractTableModel is probably a more sane base class choice for a tabular model. > When I use the model from the code below with a WTableView, the text in > all the cells is rendered as hyperlinks (base+/?_=1...). This is not That is because you return the same string for all roles (including the UrlRole). You need to check that you only return data from the DisplayRole. This seems to be a regretful choice from our side, since this is common mistake in implementing your first item model... Regards, koen ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
