带信号和插槽的QScopedPointer [英] QScopedPointer with signals and slots

查看:873
本文介绍了带信号和插槽的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类引用

这篇关于带信号和插槽的QScopedPointer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆