Sorry again for my really bad explanation. I'm not used to post in a forum like this one.
Let's try to do it better:
I had one program made in C language by another guy. All the results of that program appear in the terminal console. Also the program creates 3 files with the information. Now, I created the GUI and directly put the code of the original program in the menu, in each function on each button without changing anything. So, the program is working perfectly because when I press the buttons of the GUI they do what they has to do, but the results are still appearing in the terminal console, like before, not in the TextEdit that I put in the GUI.
I know that is because there is no connection between both, my textEdit and the code of the original program because I did nothing, I just put the original code in each function of each button of the GUI. The code of the first function for example is like this:

Button Scan

void BTScanning::scan()
{
system("hcitool scan");
}

This function scans an area looking for some bluetooth devices that are connected, and the result of this function, once I press the button of the menu in the GUI appears in the terminal console, not in the textEdit area of the GUI.
How can I do this? how can I "put" what appears in the terminal in that area of the GUI? How can I connect both?
Thanks a lot again for your help.