Results 1 to 2 of 2

Thread: Pointer to ActiveX object in QT

  1. #1
    Join Date
    Jun 2007
    Qt products
    Qt4 Qt/Embedded

    Default Pointer to ActiveX object in QT

    How can I get a pointer to an ActiveX object encapsulated by a QAxWidget?
    I've searched through alot of documentation and I haven't found anything that works.
    The control is created through QAxWidget.setControl and an ID string. Maybe you can create the object right away somehow and pass a pointer to it to the setControl function? I have no idea, I'm quite new to COM programming...

    I'm looking for something like this MFC code:

    SomeInterface* axObject = GetDlgItem(IDC_NAME)->GetControlUnknown();

    Thank you.

  2. #2
    Join Date
    Jan 2007
    Augsburg, Germany
    Thanked 6 Times in 5 Posts
    Qt products
    MacOS X Unix/X11 Windows

    Default Re: Pointer to ActiveX object in QT

    Same like everywhere: queryInterface()

    Copied from Qt Docs:
    Qt Code:
    1. IUnknown *iface = 0;
    2. activeX->queryInterface(IID_IUnknown, (void**)&iface);
    3. if (iface) {
    4. // use the interface
    5. iface->Release();
    6. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Replies: 3
    Last Post: 7th October 2015, 19:43
  2. simple pointer question
    By mickey in forum General Programming
    Replies: 6
    Last Post: 16th June 2006, 09:19
  3. Signals destroys my pointer
    By Jojo in forum Qt Programming
    Replies: 12
    Last Post: 7th March 2006, 21:05


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.