I'm trying to get Qt creator to print a user input by using a push button on an UI into the terminal. As of now, the code is executable on the terminal via human input. Here is the code:
void MainWindow::on_pushButton_clicked()
{
QProcess::execute("/catkin_ws/devel/lib/submodbus");
system("cd catkin_ws/devel/lib/submodbus");
system("./submodbus_node");
}
Current output when using the code

Output via human input

The versions i'm running on are: -Ubuntu 16.04 -QT Creator 3.5.1
cd catkin_ws/devel/lib/submodbustocd /full_path/of/catkin_ws/devel/lib/submodbussystem("cd catkin_ws/devel/lib/submodbus"); system("./submodbus_node");and changeQProcess::execute("/catkin_ws/devel/lib/submodbus");toQProcess::execute("/full/path/of/catkin_ws/devel/lib/submodbus/submodbus_node");