'Qt Override.'

def data(self, index, role=Qt.DisplayRole):

    row = index.row()
    if ((not index.isValid()) or (not (0 <= row < len(self.shortcuts)))):
        return to_qvariant()
    shortcut = self.shortcuts[row]
    key = shortcut.key
    column = index.column()
    if (role == Qt.DisplayRole):
        if (column == CONTEXT):
            return to_qvariant(shortcut.context)
        elif (column == NAME):
            color = self.text_color
            if (self._parent == QApplication.focusWidget()):
                if (self.current_index().row() == row):
                    color = self.text_color_highlight
                else:
                    color = self.text_color
            text = self.rich_text[row]
            text = '<p    style="color:{0}">{1}</p>'.format(color, text)
            return to_qvariant(text)
        elif (column == SEQUENCE):
            text = QKeySequence(key).toString(QKeySequence.NativeText)
            return to_qvariant(text)
        elif (column == SEARCH_SCORE):
            return to_qvariant(self.scores[row])
    elif (role == Qt.TextAlignmentRole):
        return to_qvariant(int((Qt.AlignHCenter | Qt.AlignVCenter)))
    return to_qvariant()
