I am currently using Fedora 23 and QT 5.6. I am building a command for Hping3 and trying to send that command to the terminal and receive the results. I can get the terminal to open but I can not get it to receive any commands. I am very new to QT so my knowledge is minimal. I learned programming with Visual Basic so I understand logic but this syntax is killing me.
Qt Code:
//Sending the command to terminal QProcess proc; proc.start("/usr/bin/gnome-terminal"); proc.waitForStarted(); proc.write("su"); proc.write("ite"); //proc.write(command); proc.waitForFinished(); proc.close(); ui->dgvResults->setText(output);To copy to clipboard, switch view to plain text mode
I am trying to display in a QTextBrowser and Commented out that one write command because I am getting an error
/home/itestudent/SeniorProject/frmmain.cpp:112: error: no matching function for call to 'QProcess::write(QString&)'
proc.write(command);
^
Command is declared at the top of the button push event
QString command = "hping3 -S ";
Bookmarks