Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt and COM problem (QvariantList &*)
Forum Updated to NodeBB v4.3 + New Features

Qt and COM problem (QvariantList &*)

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RavensAngel
    wrote on last edited by
    #1

    All,

    i'm trying to access a COM object using Qt.
    I used dumpcpp to generate the c++ namespace for the type library.

    While i can use some methods without problem, i have troubles using the following method, documented as followed:

    • void SetBillTypeEnables (QVariantList*& billTypeEnables) [slot]
      Connect a signal to this slot:
      QObject::connect(sender, SIGNAL(someSignal(QVariantList*&)), object, SLOT(SetBillTypeEnables(QVariantList*&)));Or call the function directly:
      @QVariantList params = ...
      object->dynamicCall("SetBillTypeEnables(QVariantList*&)", params);@

    I tried couple of things, but it doesn't seem to work. The method actually requires a reference to an array of booleans (5). Dumpcpp converted it into the QVariantList*& parameter.

    Any help on how to call this.
    I tried the following, which in my opinion should work, but it doesn't:

    @VariantList* newValues = new QVariantList( );
    newValues->append( false );
    newValues->append( true );
    newValues->append( true );
    newValues->append( true );
    newValues->append( true );

    _acc->dynamicCall( "SetBillValueEnables( QVariantList & )", qVariantFromValue( (void) newValues ) );@

    The qVariantFromValues is required, because QVariant doesn't accept a pointer as argument at construction.
    The actual result = the debugger showing me the follwing error: QAxBase: Error calling IDispatch member SetBillValueEnables: Unknown error

    The error message is rather obscure and i don't have to much experience with COM. But has anyone a clue on how i can solve this, or what i do wrong?

    Thx in advance.

    Edit: Should have added that i'm using Qt 4.7.4 for Desktop - MinGW 4.4 (sdk 1.1.4)

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RavensAngel
      wrote on last edited by
      #2

      Really no one?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved