I have a question that i really don't know.
Here is the my code.
Qt Code:
  1. QString from;
  2. QFile file( ":/direction.js");
  3. if ( !file.open(QIODevice::ReadOnly | QIODevice::Text) )
  4. {
  5. msg.setText("Fail");
  6. msg.exec();
  7. }
  8. else
  9. {
  10. from = "6";
  11. QString functions = file.readAll();
  12. QWebFrame* frame = ui->webView->page()->mainFrame();
  13. frame->evaluateJavaScript( functions );
  14.  
  15. QString script = QString("Direction(%1);").arg( from );
  16. frame->evaluateJavaScript(script);
  17. }
To copy to clipboard, switch view to plain text mode 
and the content of direction.js like :
Qt Code:
  1. function Direction (from)
  2.  
  3. {
  4.  
  5. alert("This is Direction");
  6. alert(from);
  7.  
  8. }
To copy to clipboard, switch view to plain text mode 

But i am very confused with the value of QString from.
when i put it : from="8".It run OK
But when i put it : from="a".It can not run.
If you know this problem.Please explain it for me.
Thanks and best regards!