View Single Post
Old 04-16-2010, 06:21 AM   #11
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kovidgoyal View Post
@chaley: Regarding display of bool columns. I'd suggest simply using Qt.DecorationRole. Return a QIcon of a green tick mark for true, red X for false and NONE for blank. IIRC, those two images are already included with calibre
Thanks! That is the secret sauce I was missing. I kept trying to do it with widgets, which didn't work at all.

In this case, would you use a tristate checkbox to set it, or a combobox containing Yes, No and blank? Either is possible, although there might be some issues with the combobox painting over the decorations.
chaley is offline   Reply With Quote