HtmlItemDelegate

class glue.utils.qt.HtmlItemDelegate

Bases: PyQt5.QtWidgets.QStyledItemDelegate

An item delegate that can be used for e.g. QTreeView, QTreeWidget, QListView or QListWidget. This will automatically intepret 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, QPainter, QStyleOptionViewItem, …)
sizeHint(option, index)

Methods Documentation

paint(self, QPainter, QStyleOptionViewItem, QModelIndex)
sizeHint(option, index)