qobject_cast dynamic_cast

void QLadderDiagramItem::GetMainForm(DoType sourceType)
{
for each (QWidget *w in qApp->topLevelWidgets())
{
if (Shell* helpEvent = qobject_cast<Shell*>(w))
{
helpEvent->OnLadderDiagramItemChange(this, sourceType);
}
}

}

 

struct st_Param {
int iParamCount; //参数个数
CString strParam[MAX_PARAMCOUNT]; //各参数信息
int iParamType[MAX_PARAMCOUNT]; //参数类型 位 ,字

st_Param()
{
iParamCount = 0;
for (int i = 0; i < MAX_PARAMCOUNT; i++)
{
strParam[i] = _T("");
iParamType[i] = 0;
}

}//指令类型
}CmdParam[MAX_PARAMCLASS];

 

 

 

QLadderDiagramItem* node_temp = dynamic_cast<QLadderDiagramItem *>(temp);

posted @ 2019-06-25 17:00  石首桃花山  阅读(581)  评论(0编辑  收藏  举报