You can, actually, use object with eventFilter and installEventFilter function.
#ifndef SHIFTENTERFILTER_H
#define SHIFTENTERFILTER_H
#include <QObject>
#include <QEvent>
#include <QKeyEvent>
class ShiftEnterFilter : public QObject
{
    protected:
        virtual bool eventFilter(QObject *, QEvent *event) {
            if(event -> type() == QEvent::KeyPress)
            {
                QKeyEvent *keyEvent = static_cast <QKeyEvent> (event);
                if((keyEvent -> modifiers() & Qt::ShiftModifier) && ((keyEvent -> key() == Qt::Key_Enter) || (keyEvent -> key() == Qt::Key_Return)))
                    return true;
            }
            return false;
        }      
    public:
        ShiftEnterFilter(QObject *parent = 0) : QObject(parent) {}
};  
#endif 
Just install this filter to your QPlainTextEdit
// code
ui -> plainTextEdit -> installEventFilter(new ShiftEnterFilter(this));
// code