|
FougTools
0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
|
#include <qttools/core/qobject_wrap.h>
Public Member Functions | |
| QObjectWrap (const T &value, QObject *parent=nullptr) | |
| QObjectWrap (T &&value, QObject *parent=nullptr) | |
| const T & | value () const |
| void | setValue (const T &val) |
| void | setValue (T &&val) |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename T > | |
| QObjectWrap< T > * | wrapAsQObject (const T &value, QObject *parent=nullptr) |
Wraps (adapts) any class object into a QObject instance
This class is useful to let Qt handle the lifecycle of a non QObject : wrap an instance to a QObject and then let its parent takes ownership
| qtcore::QObjectWrap< T >::QObjectWrap | ( | const T & | value, |
| QObject * | parent = nullptr |
||
| ) |
| qtcore::QObjectWrap< T >::QObjectWrap | ( | T && | value, |
| QObject * | parent = nullptr |
||
| ) |
| void qtcore::QObjectWrap< T >::setValue | ( | const T & | val | ) |
| void qtcore::QObjectWrap< T >::setValue | ( | T && | val | ) |
| const T & qtcore::QObjectWrap< T >::value | ( | ) | const |
|
related |
Create a QObjectWrap<T> owning value
This is equivalent to qtcore::QObjectWrap<T>(value, parent), but usually requires less typing
1.8.8