diff --git a/src/gui/ptm_peptide_list_view/ptmsequencedelegate.cpp b/src/gui/ptm_peptide_list_view/ptmsequencedelegate.cpp index f7a38cc77b5cfd44918ea6f23d03270440c7080c..1c594a10a0a15f3db7fc38dc802a86a430315ab5 100644 --- a/src/gui/ptm_peptide_list_view/ptmsequencedelegate.cpp +++ b/src/gui/ptm_peptide_list_view/ptmsequencedelegate.cpp @@ -29,6 +29,7 @@ #include "ptmsequencedelegate.h" #include "../../grouping/ptm/ptmsamplescan.h" #include <QTextEdit> +#include <QPainter> PtmSequenceDelegate::PtmSequenceDelegate(QWidget *parent) : QStyledItemDelegate(parent) { @@ -42,8 +43,14 @@ void PtmSequenceDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o // if (option.state & QStyle::State_Selected) // painter->fillRect(option.rect, option.palette.highlight()); - //QTextEdit edit; - + QTextEdit edit_seq; + edit_seq.setPlainText(p_ptm_sample_scan->getRepresentativePeptideMatch()->getPeptideXtpSp().get()->getSequence()); + + painter->save(); + painter->translate(option.rect.x(), option.rect.y()); + edit_seq.render(painter); + painter->restore(); + //edit_seq.render(painter); //edit..paint(painter, option.rect, option.palette, // StarRating::ReadOnly); } else {