diff --git a/src/gui/ptm_peptide_list_view/ptmsequencedelegate.cpp b/src/gui/ptm_peptide_list_view/ptmsequencedelegate.cpp
index 1c594a10a0a15f3db7fc38dc802a86a430315ab5..509440253d3748f21cf84826f6d8f97381d5ff3a 100644
--- a/src/gui/ptm_peptide_list_view/ptmsequencedelegate.cpp
+++ b/src/gui/ptm_peptide_list_view/ptmsequencedelegate.cpp
@@ -28,7 +28,7 @@
 
 #include "ptmsequencedelegate.h"
 #include "../../grouping/ptm/ptmsamplescan.h"
-#include <QTextEdit>
+#include <QTextDocument>
 #include <QPainter>
 
 PtmSequenceDelegate::PtmSequenceDelegate(QWidget *parent) : QStyledItemDelegate(parent) {
@@ -43,13 +43,13 @@ void PtmSequenceDelegate::paint(QPainter *painter, const QStyleOptionViewItem &o
 
        // if (option.state & QStyle::State_Selected)
         //    painter->fillRect(option.rect, option.palette.highlight());
-        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();
+        QTextDocument document;
+     document.setDocumentMargin(2);
+     document.setHtml(p_ptm_sample_scan->getRepresentativePeptideMatch()->getPeptideXtpSp().get()->getSequence());
+     painter->translate(option.rect.topLeft());
+     document.drawContents(painter);
+     painter->translate(-option.rect.topLeft());
+     
         //edit_seq.render(painter);
         //edit..paint(painter, option.rect, option.palette,
         //                 StarRating::ReadOnly);