Blame view

QChatClient/chatinputtext.cpp 332 Bytes
1
2
#include "chatinputtext.h"
Imanol-Mikel Barba Sabariego authored
3
4
#include <QTextCodec>
5
6
7
8
9
10
11
12
13
14
15
16
17
18
chatInputText::chatInputText(QWidget *parent) :
    QTextEdit(parent)
{
}

void chatInputText::keyPressEvent(QKeyEvent *ke)
{
    if(ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter)
    {
        emit msgReady();
        return;
    }
    QTextEdit::keyPressEvent(ke);
}