How to execute .hex file on the other device using QT Application
-
Hi,
I am new to QT. I have created a sample application for selecting the .hex file through FileDialog and I need to execute the selected .hex file on my device. For that I have used the QProcess::startDetached but the file is not executed. Can you please let me know how to execute this file on my android device. Below is the Code which I have tried.
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setNameFilter(tr("Hex Files (*.hex)"));
dialog.setViewMode(QFileDialog::Detail);
QStringList fileNames;
if (dialog.exec())
{
fileNames = dialog.selectedFiles();//QString program("cmd /k cd " + fileNames[0]); //bool chk=QProcess::startDetached(program); QProcess::startDetached(fileNames[0]); if(chk==true) { QMessageBox::information(this,"Information","File is Executed"); } else { QMessageBox::information(this,"Information","File is Not Executed"); } }
-
Hi,
I am new to QT. I have created a sample application for selecting the .hex file through FileDialog and I need to execute the selected .hex file on my device. For that I have used the QProcess::startDetached but the file is not executed. Can you please let me know how to execute this file on my android device. Below is the Code which I have tried.
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setNameFilter(tr("Hex Files (*.hex)"));
dialog.setViewMode(QFileDialog::Detail);
QStringList fileNames;
if (dialog.exec())
{
fileNames = dialog.selectedFiles();//QString program("cmd /k cd " + fileNames[0]); //bool chk=QProcess::startDetached(program); QProcess::startDetached(fileNames[0]); if(chk==true) { QMessageBox::information(this,"Information","File is Executed"); } else { QMessageBox::information(this,"Information","File is Not Executed"); } }
How to execute .hex file on the other device using QT Application
In what way is a file ending in
.hex
executable under Android?What do you mean about "executing something on the other device"? What two devices are involved, and where are you trying to execute what "on the other device"?
-
How to execute .hex file on the other device using QT Application
In what way is a file ending in
.hex
executable under Android?What do you mean about "executing something on the other device"? What two devices are involved, and where are you trying to execute what "on the other device"?
-
How to execute .hex file on the other device using QT Application
In what way is a file ending in
.hex
executable under Android?What do you mean about "executing something on the other device"? What two devices are involved, and where are you trying to execute what "on the other device"?
-
@jsulm I don't know about that we are just testing the application how it works. I got a task like I need to execute the hex file on the android device.
-
@kabdul If you don't know what this hex file is and whether it is a valid Android executable, why don't you create a small console app for android and try to start that one?
@jsulm said in How to execute .hex file on the other device using QT Application:
@kabdul If you don't know what this hex file is and whether it is a valid Android executable, why don't you create a small console app for android and try to start that one?
How to do that one? can you please give me any sample code.
-
i have the same problem