当前位置:编程学习 > wap >>

Qt调用CodeSoft打标签问题

在Win32平台下做打标签,总是不成功,请高手指点。代码如下

void PrintLabel::label_returnPressed()
{
if(!lppx)//lppx init ok
{
ui.label->setText("lppx init fail.");

return;
}


QAxObject *docs = lppx->querySubObject("Documents");//docs not null,ok
docs->dynamicCall("CloseAll(bool)",false);//ok
//QAxObject *lppxDoc = docs->querySubObject("Open(QString,bool)","C:\\label.lab",false);//lppxDoc not null,ok
docs->dynamicCall("Open(QString,bool)","C:\\label.lab",false);//Open OK

//qDebug()<<lppxDoc->dynamicCall("FullName").toString();//""
QAxObject *lppxDoc = lppx->querySubObject("ActiveDocument");//lppxDoc not null
qDebug()<<lppx->querySubObject("ActiveDocument")->property("FullName").toString();//output "",reason??
qDebug()<<docs->querySubObject("Item(QString)","label.lab")->property("FullName").toString();//also ""
QAxObject *vars = lppxDoc->querySubObject("Variables");

QAxObject *var1 = vars->querySubObject("Item(QString)","var1");
qDebug()<<var1->property("Value").toString();
var1->setProperty("Value",ui.lineEdit->text());// set value fail
//lppx->setProperty("Visible",true);

//lppxDoc->dynamicCall("PrintDocument()");
}
--------------------编程问答-------------------- 看样子没人会啊还是没人用过啊 --------------------编程问答-------------------- 难道是分数给的太低了,只要高手能解决可加分。
补充:移动开发 ,  Qt
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,