Results 1 to 3 of 3

Thread: ActiveQt: How to pass image to ActiveX object?

  1. #1
    Join Date
    Feb 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default ActiveQt: How to pass image to ActiveX object?

    Hi folks,
    I have embedded an ActiveX control (Moving Map ActiveX Control by Global Majic Software Inc.) into my Qt (4.1.3) application successfully:

    Qt Code:
    1. QAxWidget *moving_map = new QAxWidget(map_frame);
    2. moving_map->setControl(QString::fromUtf8("{D5F63C24-B3D3-11D0-B8F0-0020AF344E0A}"));
    To copy to clipboard, switch view to plain text mode 
    and all of the following settings are working as expected:

    Qt Code:
    1. moving_map->dynamicCall("SetObjects(1)");
    2. moving_map->dynamicCall("SetZoomEnabled(true)");
    3. moving_map->setProperty("ObjectHeadingLineRange", 50.0);
    4. moving_map->dynamicCall("SetObjectHeadingLineColor(OLE_COLOR)", 0x00ff00);
    To copy to clipboard, switch view to plain text mode 

    BUT: now I want to set a map-image to my control. The interface description offers this function:
    void SetMapPicture(LPPICTUREDISP picture);

    I tried it with this:
    Qt Code:
    1. QPixmap map_image("blabla.bmp");
    2. /*a:*/ moving_map->dynamicCall("SetMapPicture(IPictureDisp*)", map_image);
    3. // or
    4. /*b:*/ moving_map->setProperty("MapPicture", map_image);
    To copy to clipboard, switch view to plain text mode 

    It compiles well but at runtime I get the following messages all the time:
    a: QAxBase: Error calling IDispatch member SetMapPicture: Type mismatch in parameter 0.
    or
    b: QAxBase: Error calling IDispatch member MapPicture: Type mismatch in parameter 0.
    What am I doing wrong??? What will work????

    I hope that anyone can help....
    Kind regards,
    Andreas

  2. #2
    Join Date
    Feb 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: ActiveQt: How to pass image to ActiveX object?

    Does nobody have a solution???

  3. #3
    Join Date
    Feb 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: ActiveQt: How to pass image to ActiveX object?

    Still no one any idea??????

Similar Threads

  1. Replies: 3
    Last Post: 7th October 2015, 19:43
  2. get QImage object from buffer
    By Sheng in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2012, 02:03

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.