本文介绍了带信号和插槽的QScopedPointer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我说的话,我找不到任何关系或如何将它们传递给信号和插槽。

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? :)

推荐答案

你必须得到一个 QObject派生类对象从 QScopedPointer 通过 QScopedPointer :: data()方法并使用它:

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-05 07:24