求助:CATScriptUtilities::ExecuteScript 的用法
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了求助:CATScriptUtilities::ExecuteScript 的用法相关的知识,希望对你有一定的参考价值。
今天 试着 使用 CATScriptUtilities::ExecuteScript在mkmk的时候,报 这个错误:InsertCmd.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static long __stdcall CATScriptUtilities::ExecuteScript(class CATUnicodeString const &,enum CatScriptLibraryType,class CATUnicodeString const &,struct tagVARIANT &,class CATUnicodeString const &,struct tagVARIANT *,unsigned int,unsigned char)" (__imp_?ExecuteScript@CATScriptUtilities@@SGJABVCATUnicodeString@@W4CatScriptLibraryType@@0AAUtagVARIANT@@0PAU4@IE@Z)D:\DassaultSProject\DraftingInterfaces\.\intel_a\code\bin\InsertCmd.dll : fatal error LNK1120: 1 unresolved externals在VC的时候,是说lib库没连接,CAA不知道是什么原因,我查了帮助在Imakefile.mk文件内我加了CATAutoItf (我理解就相当与在VC内加lib库文件)LINK_WITH = $(WIZARD_LINK_MODULES) CATAutoItf 仍然出上面的错误:是否是Frame的 IdentityCard.h 内缺了什么?
参考技术A 我的CAA 不知到何故没有 CATScriptUtilities 的例子, 请谁帮忙传一个上来呀求助QlistView-CSDN论坛
参考技术A void QAbstractItemView::setModel(QAbstractItemModel *model)Q_D(QAbstractItemView);
if (model == d->model)
return;
if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel())
disconnect(d->model, SIGNAL(destroyed()),
this, SLOT(_q_modelDestroyed()));
disconnect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
disconnect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
this, SLOT(_q_headerDataChanged()));
disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(rowsInserted(QModelIndex,int,int)));
disconnect(d->model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(_q_rowsRemoved(QModelIndex,int,int)));
disconnect(d->model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
this, SLOT(_q_columnsAboutToBeRemoved(QModelIndex,int,int)));
disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
this, SLOT(_q_columnsRemoved(QModelIndex,int,int)));
disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)),
this, SLOT(_q_columnsInserted(QModelIndex,int,int)));
disconnect(d->model, SIGNAL(modelReset()), this, SLOT(reset()));
disconnect(d->model, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
d->model = (model ? model : QAbstractItemModelPrivate::staticEmptyModel());
// These asserts do basic sanity checking of the model
Q_ASSERT_X(d->model->index(0,0) == d->model->index(0,0),
"QAbstractItemView::setModel",
"A model should return the exact same index "
"(including its internal id/pointer) when asked for it twice in a row.");
Q_ASSERT_X(d->model->index(0,0).parent() == QModelIndex(),
"QAbstractItemView::setModel",
"The parent of a top level index should be invalid");
if (d->model != QAbstractItemModelPrivate::staticEmptyModel())
connect(d->model, SIGNAL(destroyed()),
this, SLOT(_q_modelDestroyed()));
connect(d->model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
connect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
this, SLOT(_q_headerDataChanged()));
connect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)),
this, SLOT(rowsInserted(QModelIndex,int,int)));
connect(d->model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
connect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
this, SLOT(_q_rowsRemoved(QModelIndex,int,int)));
connect(d->model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
this, SLOT(_q_columnsAboutToBeRemoved(QModelIndex,int,int)));
connect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
this, SLOT(_q_columnsRemoved(QModelIndex,int,int)));
connect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)),
this, SLOT(_q_columnsInserted(QModelIndex,int,int)));
connect(d->model, SIGNAL(modelReset()), this, SLOT(reset()));
connect(d->model, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged()));
<span style="color: #FF0000;">
QItemSelectionModel *selection_model = new QItemSelectionModel(d->model, this);
</span>
//这个TMD 怎么控制啊,大爷的,每次set 都来一个,我还没看到那边进行处理的。
//但可以肯定的是不断的setModel 我感觉100% 内存泄露
connect(d->model, SIGNAL(destroyed()), selection_model, SLOT(deleteLater()));
setSelectionModel(selection_model);
reset(); // kill editors, set new root and do layout
以上是关于求助:CATScriptUtilities::ExecuteScript 的用法的主要内容,如果未能解决你的问题,请参考以下文章