QScopedPointer with signals and slots

心不动则不痛 提交于 2019-12-13 07:41:32

问题


as the tittle says, i could not find any relationship or how to pass them to signals and slots.

Anyone could give me a quick tutorial? or Introduction? :)


回答1:


You have to get an QObject-derived class object from the QScopedPointer by QScopedPointer::data() method and use it:

QScopedPointer<QThread> p(new QThread);
connect(p.data(), SIGNAL(finished()), SLOT(onThreadFinish()));

QScopedPointer class reference



来源:https://stackoverflow.com/questions/31988399/qscopedpointer-with-signals-and-slots

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!