Results 1 to 9 of 9

Thread: COM object and QtVariant casting issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: COM object and QtVariant casting issue

    Quote Originally Posted by mlago View Post
    Yes, compile Ok. What do you suggest?.
    I haven't worked with COM or ActiveQt, but if the object is stored as a IUnknown in the QVariant, then just extract it as such and then use whatever API is provided for working with COM interfaces on that pointer.

    I.e. the QVariant is just a transport wrapper, like an envelope. You take the transported item out of the envelope and forget about the envelope.

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    mlago (4th January 2017)

Similar Threads

  1. casting object to enum in Qt
    By alizadeh91 in forum Qt Programming
    Replies: 1
    Last Post: 18th August 2012, 15:22
  2. Two dynamically created object interaction issue
    By kornicameister in forum Qt Quick
    Replies: 2
    Last Post: 9th September 2011, 11:35
  3. QtVariant pointer from QHash list
    By rmat in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2011, 10:28
  4. Qt Webkit 2.1 - SVG Issue - Object overlapping
    By Tushar in forum Qt Programming
    Replies: 0
    Last Post: 29th December 2010, 08:32
  5. object handling issue
    By prolink007 in forum Qt Programming
    Replies: 1
    Last Post: 12th April 2010, 07:42

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.