Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.3.0, 5.3.1
-
None
Description
In this modern era I think many people want to use smart pointers instead of raw pointers, and so it would be neat to be able to expose them to QML, like so:
Smart class
class Test : public QObject { Q_PROPERTY(QSharedPointer<Theme> theme READ theme CONSTANT) private: QSharedPointer<Theme> m_theme; }
The only alternative I see right now is to have a private function which just returns the raw pointer, which doesn't look too good.
Attachments
Issue Links
- is replaced by
-
QTBUG-35404 Cannot use QSharedPointer with QJSEngine
- Closed