HtmlItemDelegate#

class glue_qt.utils.HtmlItemDelegate#

Bases: QStyledItemDelegate

An item delegate that can be used for e.g. QTreeView, QTreeWidget, QListView or QListWidget. This will automatically interpret any HTML that is inside the items in these views/widgets.

This is more efficient than using e.g. QLabel instances embedded in the views/widgets, and is required for horizontal scroll bars to appear correctly.

Methods Summary

paint(self, painter, option, index)

sizeHint(self, option, index)

Methods Documentation

paint(self, painter: QPainter, option: QStyleOptionViewItem, index: QModelIndex)#
sizeHint(self, option: QStyleOptionViewItem, index: QModelIndex) QSize#