QAxObject property returns invalid QVariant

  • Hi,

    in my first Qt project I try to automate another application via OLE.

    Creating the application object and a sub object works (I see the form on desktop). Calling the method 'Quit' works too, but requesting a property value always returns an invalid QVariant.
    Any idea, what I do wrong?

    Here a part of my source code:
    QAxObject broker;
    bool brokerReady = broker.setControl("Broker.Application");

        QAxObject *analysis = broker.querySubObject("Analysis");
        QVariant version ="Version");


  • Did you try to get the version with dynamicCall?
    QVariant version=broker.dynamicCall("Version");@

  • No. So I didn't try it.

    But, it works!!!!!

    On this idea I would never have come. Requesting a property value with calling a method.

    Thank you very very very much for your help!!!!

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.