use a null QVariant, not a QVariant with a string="missing"
use a null QVariant, not a QVariant with a string="missing"
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
I had already try with NULL variant (and a lot of stupid test that i prefer to not post here)
but nothing is working
Qt Code:
worksheet_copy_after = sheets->querySubObject("Item( int )", 5 ); worksheet_to_copy->dynamicCall("Copy (const QVariant&, const QVariant&)",param1,param2);To copy to clipboard, switch view to plain text mode
any suggestion?
thanks
QVariant param1 = NULL;
does that even compile? I don't believe it is a null variant though - if it compiles it will be a QVariant of type string with string = "", or a QVariant of type int with value = 0, or something like that.
This is how you make a null variant:
QVariant param;
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
Of course it compiles. I will not post something which not compile.
Qt Code:
worksheet_copy_after = sheets->querySubObject("Item( int )", 5 ); QVariant param1; worksheet_to_copy->dynamicCall("Copy (const QVariant&, const QVariant&)",param1,param2);To copy to clipboard, switch view to plain text mode
Doesn't work anymore!
only this idea, I don't know if it will work at all:
Qt Code:
call = call.arg(after); activeX->dynamicCall(call.toLatin1().constData());To copy to clipboard, switch view to plain text mode
I thought of that after reading http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx and http://qt-project.org/doc/qt-4.8/qax...ml#dynamicCall. The problem is how to deal with 'missing' correctly. If you can think of some way to access System.Type.Missing then that will probably help.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
seems working !Qt Code:
call = call.arg(after);To copy to clipboard, switch view to plain text mode
but what is your activeX?Qt Code:
activeX->dynamicCall(call.toLatin1().constData());To copy to clipboard, switch view to plain text mode
worksheet_to_copy
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
NULL is:
therefore this:
stores an integer of value "0" in the variant.
Bookmarks