[SOLVED] textEdit textChanged return key



  • how to get the following code to work. in the textEdit textChanged function, i am trying to get to code to recognize the return key. if the return key was pressed, it will set the pushbutton text to "test".

    your code has to work for this code below because there is no way to get the code to work with the keypressevent.

    is it possible to get the very end string of textEdit text and say if it is return then do something.

    the error i get for the code below is warning: 'keyEvent' is used uninitialized in this function

    @void MainWindow::on_plainTextEdit_textChanged()
    {
    QKeyEvent *keyEvent;

    if (keyEvent->key() == Qt::Key_Return)
        ui->pushButton->setText("test");
    

    }@



  • I found a solution to my textEdit problem and it can be found "here...":http://developer.qt.nokia.com/forums/viewthread/8828/


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.