Results 1 to 1 of 1

Thread: Working with ActiveX client QAxWidget

  1. #1
    Join Date
    Jan 2010
    Qt products

    Default Working with ActiveX client QAxWidget


    I can not get the output parameters returned by any of the functions I call using dynamicCall(). Could you help me?

    I need to use an ActiveX control in my QT user interface, so I have create an instance of a QAxWidget. Then I modify several properties of the ActiveX without any problem. But I have problems to obtain the resulting values of any function I call using dynamic call. Here you have a sample of my code:

    Qt Code:
    1. QAxWidget *activeX;
    2. activeX = new QAxWidget(this);
    3. activeX->setControl("{6E4688A6-4FCE-40FF-9D27-8AC603C7BF43}" );
    5. activeX->setProperty("Asynch", false);//No problem with this sentence
    6. activeX->setProperty("Acquire", true);//No problem with this sentence
    8. QVariant miData;
    9. //Signature of the GetRawData function in the ActiveX:
    10. //HRESULT GetRawData( bool isPointer, VARIANT* pArray );
    11. //isPointer [in] : If false returns the array of raw data, otherwise returns pointer to data.
    12. // pArray [out,retval] : Pointer to the SAFEARRAY containing the raw data buffer.
    13. activeX->dynamicCall("GetRawData(QBool,QVariant)",TRUE,miData);//Does not assign anything to output parameter miData
    To copy to clipboard, switch view to plain text mode 

    This ActiveX permits capturing from a specific digital video camera, and the output of this function should return a pointer to the first element of a array of bytes containing the image acquired by the camera.

    More specifically my problems are two. First, how to obtain the output of the ActiveX functions in QT. And second, how to cast the QVariant into a more usable format like uchar*.

    Thank you very much for your attention
    Last edited by InnoQT; 29th January 2010 at 11:36.

Similar Threads

  1. Error to use QAxWidget
    By HelloDan in forum Qt Programming
    Replies: 6
    Last Post: 16th May 2009, 09:57
  2. QAxWidget
    By rajeshs in forum Qt Programming
    Replies: 1
    Last Post: 5th September 2008, 06:13
  3. QAxWidget
    By chak_med in forum Newbie
    Replies: 1
    Last Post: 10th September 2006, 21:05
  4. QAxWidget Properties
    By ToddAtWSU in forum Newbie
    Replies: 1
    Last Post: 13th February 2006, 18:45
  5. QAxWidget
    By ToddAtWSU in forum Newbie
    Replies: 2
    Last Post: 3rd February 2006, 18:29

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.