nooky59
4th June 2009, 14:56
Hi everybody,
I have actually a QStandardItemModel where I set sometimes items with a QFontRole or QDecorationRole to display an image or another (so it could be a bool in database for example).
I have not experienced so much with the 2 approachs but like the QTableModel approach. But I wonder if I will be easily able to add a QFontRole to all the columns of a row depending on the bool value.
For the ability to display an image or another on the bool column, I suppose this is do-able as I've seen the books example with the "stars rating" custom delegate.
So, I almost wonder if I could do something with QFontRole on a QTableModel or if it should be better to deal with the other approach with pure SQL then dealing with the model myself.
Thanks for your advice.
I have actually a QStandardItemModel where I set sometimes items with a QFontRole or QDecorationRole to display an image or another (so it could be a bool in database for example).
I have not experienced so much with the 2 approachs but like the QTableModel approach. But I wonder if I will be easily able to add a QFontRole to all the columns of a row depending on the bool value.
For the ability to display an image or another on the bool column, I suppose this is do-able as I've seen the books example with the "stars rating" custom delegate.
So, I almost wonder if I could do something with QFontRole on a QTableModel or if it should be better to deal with the other approach with pure SQL then dealing with the model myself.
Thanks for your advice.