Example #1
0
 def __init__(self, model, parent, *args):
     super(HexItemDelegate, self).__init__(parent)
     # compute size hint for hex view
     dh = QTextDocument()
     dh.setHtml("<font color='green'>DF</font>")
     self.hex_hint = QtCore.QSize(dh.idealWidth()-dh.documentMargin(), 22)
     # compute size hint for char view
     dc = QTextDocument()
     dc.setHtml("W")
     self.char_hint = QtCore.QSize(dc.idealWidth()-dc.documentMargin(), 22)
     self._model = model