FreddyKay
30th March 2014, 12:41
Hey guys!
Thats probably a very simple question but I just could not figure it out. I am using a QTextEdit as a simple Control and Command Console for an external device. When the device is sending something to the computer I display that in the QTextEdit using the append method:
void DisplayText(QString msg){
ui.textEdit->append(msg);
}
As long as I am only trying to display something it is working correctly, but I want to use it as a command interface as well. So when I try to write something in the QtextEdit it is starting at the end of the last appended line, but I want it to start in a new line instead (this is because I want to take the whole last line and interpret the command from there). Is there a way to achieve that?
Thats probably a very simple question but I just could not figure it out. I am using a QTextEdit as a simple Control and Command Console for an external device. When the device is sending something to the computer I display that in the QTextEdit using the append method:
void DisplayText(QString msg){
ui.textEdit->append(msg);
}
As long as I am only trying to display something it is working correctly, but I want to use it as a command interface as well. So when I try to write something in the QtextEdit it is starting at the end of the last appended line, but I want it to start in a new line instead (this is because I want to take the whole last line and interpret the command from there). Is there a way to achieve that?