Results 1 to 3 of 3

Thread: How to use QAxWidget->dynamicCall() with VARIANT*

  1. #1
    Join Date
    Sep 2016
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Windows Android

    Default How to use QAxWidget->dynamicCall() with VARIANT*

    need a help regarding following matter.

    this is the function that I'm going to call using dynamicCall();->getContourLine(double x1, double y1, double x2, double y2, VARIANT* strPTs)

    ui.axWidget->dynamicCall("getContourLine(double x1, double y1, double x2, double y2, VARIANT* strPTs)",202916,362432,200191,366623,"5th parameter here");

    But I cant get value which return from VARIANT* strPTs since unable to define 5th parameter correctly . if anyone Can give a solution, more than appreciated!! Thank u very much!

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: How to use QAxWidget->dynamicCall() with VARIANT*

    According to http://doc.qt.io/qt-5/qaxbase.html you should be able to use a reference to a QVariant
    Qt Code:
    1. QVariant strPTs;
    2. ui.axWidget->dynamicCall(
    3. "getContourLine(double x1, double y1, double x2, double y2, VARIANT*strPTs)",
    4. 202916, 362432, 200191, 366623, strPTs);
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Sep 2016
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Windows Android

    Default Re: How to use QAxWidget->dynamicCall() with VARIANT*

    Thank you @ChrisW67.

    I tried it. But I get the same result which "CXX0030: Error: expression cannot be evaluated". When I do it with MFC I get the correct result as in the image.result with MFC.jpg. Please help! thank you!

Similar Threads

  1. QAxWidget->dynamiccall
    By codeman in forum Qt Programming
    Replies: 0
    Last Post: 14th September 2012, 15:17
  2. Help dynamicCall()
    By marouan in forum Qt Programming
    Replies: 1
    Last Post: 15th March 2011, 10:15
  3. Using array with QAxWidget::dynamicCall() function
    By tom0485 in forum Qt Programming
    Replies: 1
    Last Post: 17th May 2010, 10:31
  4. dynamicCall and QByteArray - strange characters
    By franco.amato in forum Qt Programming
    Replies: 120
    Last Post: 28th April 2010, 21:11
  5. Replies: 0
    Last Post: 16th April 2010, 23:21

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.