Please nominate your Qt Champions for 2021!


  • Hi there,

    I am developing an application using an existing tlb file. I use dumpcpp to generate a C++ namespace.

    But when I try to access some members, a segmentation fault occurs in qmetaobject.cpp line 679.

    This is in: @int QMetaObject::indexOfProperty(const char *name) const;@

    I guess it means that Qt can't find this member in the object. However I am sure it exists. What could be wrong?

    Should I use querySubObject() instead of calling directly the generated method?

  • Still no reply and still no solution.

    I realised the problem occurs when I try to access a method when the ActiveX connection is not established yet.

  • Lifetime Qt Champion


    I'm not a QAx specialist, but are you sure your object is valid when you try to call that method ?

  • Absolutely not. That's the point. The object is sometimes valid but not always and I don't know how to check it...

  • Lifetime Qt Champion

    Can you show how you create it and use it ?

  • I use a tlb file. My .pro file has:

    @TYPELIBS = $$system( dumpcpp lib/Pulse.tlb -n PulseLabShop -o src/controller/Pulse )@

    Then I create the connection with:

    @PulseLabShop::Application *app = new PulseLabShop::Application();@

    In a destructor I have:


    But if the connection has been lost I have a SIGSEGV error. I would like to check if I can reliably call the Quit() function.

  • Lifetime Qt Champion

    What other methods are available in this Application object ?

  • It has many but all will fail if the connection has not been set or if the connection is broken. I think the QMetaObject class shall have a method that tests the establishment of a connection.

    Hasn't anyone faced this problem before?

  • Lifetime Qt Champion

    That's a question you should ask on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented)

  • Okay you're right.

    Just an additional information.

    I voluntarily generated an error while connecting to the QAxObject and I got those messages in the Qt Creator console:

    CoCreateInstance failure (The class has not a valid license.)

    QAxBase::setControl: requested control {587b4a33-81d3-11cf-91c5-0020af429815} could not be instantiated

    QAxBase::qt_metacall: Object is not initialized, or initialization failed

    So some messages are emitted. The question is how to catch them...

  • Lifetime Qt Champion

    Maybe the QAxBase::exception signal ?

Log in to reply