It looks like you don't know how Copy works.
here is the help
http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx
Looks like this is no longer Qt programming question...
It looks like you don't know how Copy works.
here is the help
http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx
Looks like this is no longer Qt programming question...
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.
Hi,
Thanks a lot yours link. It help me to find the solution. I need to pass the object worksheet for before or after parameter;
so instead of
Qt Code:
sheet->dynamicCall("Copy");To copy to clipboard, switch view to plain text mode
I do
Qt Code:
worksheet_copy_after = sheets->querySubObject("Item( int )", 5 ); worksheet_to_copy->dynamicCall("Copy (const QVariant&)",param1);To copy to clipboard, switch view to plain text mode
and the copy occurs in the same worksheets!!!
Thanks
In fact I success to copy before but not After
according to : http://msdn.microsoft.com/en-US/libr...(v=vs.80).aspx
I try to pass en empty Qvaraint to the first parameter but nothing happen.
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
How can I do?
Thanks
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