Mercurial > hg > Feedworm
view FeedEntryItemDelegate.py @ 77:d292ab61ed6f
Add another setting to feed: when opening a feed entry in browser, you can force opening it in an external browser now. This is because some sites just crash the QWebView.
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sat, 14 Aug 2010 02:53:49 +0200 |
parents | 0f9b3e57cff0 |
children | babe14449162 |
line wrap: on
line source
from PyQt4 import QtGui from PyQt4.QtGui import QFont class FeedEntryItemDelegate(QtGui.QStyledItemDelegate): def __init__(self): QtGui.QStyledItemDelegate.__init__(self, None) def paint(self, painter, style, index): row = index.row() entry = self.entries[row] if entry.read: style.font.setWeight(QFont.Normal) else: style.font.setWeight(QFont.Bold) QtGui.QStyledItemDelegate.paint(self, painter, style, index)