Home > Back-end >  Qt calls the adb command to the great god solve the error
Qt calls the adb command to the great god solve the error

Time:10-17

QProcess p (0);


P. tart (" CMD ", QStringList () & lt; & lt;"/c & lt;" & lt;" The adb install - r C: qq. Apk ");

P.w aitForStarted ();
P.w aitForFinished ();
//qDebug () & lt;
As=QString: : fromLocal8Bit (p.r eadAllStandardOutput ());
QBool I=the as. The contains (" sucess ");
If (I==1) {
Edit4. SetText (" sucess "); }
The else {
Edit4. SetText (" error ");
}

CodePudding user response:

Their top

CodePudding user response:

Please explain!

CodePudding user response:

O explain!

CodePudding user response:

The
refer to the original poster shiyanshi339 response:
QProcess p (0);


P. tart (" CMD ", QStringList () & lt; & lt;"/c & lt;" & lt;" The adb install - r C: qq. Apk ");

P.w aitForStarted ();
P.w aitForFinished ();
//qDebug () & lt;
As=QString: : fromLocal8Bit (p.r eadAllStandardOutput ());
QBool I=the as. The contains (" sucess ");
If (I==1) {
Edit4. SetText (" sucess "); }
The else {
Edit4. SetText (" error ");
}



Hello, can you tell me the call in the Qt under the adb project how to build, I now I have not finish the software (the front desk to use Qt) can add a android phone via usb data transmission function directly, found that can invoke the adb in Qt, so how to build this project? Whether you need to put the corresponding adb. Exe AdbWinApi. DLL AdbWinUsbApi. DLL three on a specific location? Thank you very much!
  • Related