|
我已经自己解决这个问题
主要问题在主程序部分
主程序调用部分:
void loadHomePage()
{
QPluginLoader *pluginLoader= new QPluginLoader(tr("%1DHomePage.dll").arg(gPathDll), this);
QObject *pluginObject = pluginLoader->instance();
if (pluginObject)
{
DHomePage_Plugin *monster = qobject_cast<DHomePage_Plugin*>(pluginObject);
ui->stackedWidget->addWidget(monster->createGUI());
//connect(monster,SIGNAL(sendMsg()),this,SLOT(receiveMsg())); //把这里改成下面这行就可以了
connect(pluginObject ,SIGNAL(sendMsg()),this,SLOT(receiveMsg()));
}
} |
|