On 2019-05-29 6:53 a.m., Mutz, Marc via Development wrote:
== QSharedPointer / QWeakPointer -> std::shared_ptr/weak_ptr ==
Once they are stripped of their magic QObject handling and QObject
handling returned to QPointer proper, they don't do much other than
std::shared_ptr, except being less flexible and largely untested for
exception-safety.
so QEnableSharedFromThis::sharedFromThis() would return a std::shared_ptr?
class Device : public QObject, public QEnableSharedFromThis<Device>
{
Q_OBJECT
public:
Device();
signals:
void update(QSharedPointer<Device> device);
};
in some method in Device....
emit update(sharedFromThis());
Jon
_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development