Qt 相当于 boost::shared_from_this?

标签 qt boost

我有一些派生自 boost::shared_from_this 的类 - 我如何在 Qt 中执行等效的操作? (无需重新实现类似的 shared_from_this;我更喜欢无继承解决方案)

最佳答案

如果您的意思是获得 QSharedPointer 的能力来自 this - 有这样一个 feature request ,但据我所知,它仍未在官方 Qt 版本中实现。

关于Qt 相当于 boost::shared_from_this?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12901621/

相关文章:

c++ - 将一个 QRadioButton 分组为多个 QButtonGroups

c++ - 在哪里可以找到 Qt 5 beta 2 的 Qt Location 插件?

qt - QWebView 崩溃

c++ - 如何发布 C++ - 具有单个 boost 库的应用程序

c++ - Windows服务在C++中以一定的时间间隔运行一个方法

c++ - Qt我想将一个指针编码为一个字符串,稍后再解码

qt - 在 Qt+Mac 上播放声音文件

c++ - 使用 Clang 而不是 GCC 构建(有问题的)示例时内存损坏

c++ - boost::multi_index_container 与 random_access 和 ordered_unique

c++ - 从 github 编译 c++ boost 库时出错