My C# code with ActiveX Webbrowser:
Qt Code:
  1. webBrowser1.Document.GetElementsByTagName("A")[5];
To copy to clipboard, switch view to plain text mode 

I tried to make a program with activeX Webbrowser. The webBrowser1 is the name of ACTIVEX control. And I succeeded in C# with VS 2015 IDE. And now I need to work it out in C++ with QT frame(version 5.6).

and this is my attempt code:

Qt Code:
  1. QAxObject* myEles = MyWebObj->querySubObject("Document");
  2. QAxObject* myEle = myEles->querySubObject("GetElementsByTagName(const Qstring&)", "A");
To copy to clipboard, switch view to plain text mode 
It seems that it can get Document correctly,but fail whatever next subobject is---it can compile successfully,but get error when running. It is really weird as I get everything right with ActiveX Excel with the same method.

I wonder what is wrong here.It is appreciated if someone can do it with the very ActiveX webbrowser.
And I wonder how to write to pick the element from a group with QT; Just like the example: I need to pick the 5th element. How to write it with QT?