A template utility class for converting between pointers and QVariant objects.
More...
#include <variant_pointer.h>
|
| static T * | asPtr (QVariant v) |
| | Converts a QVariant containing a void pointer back to a typed pointer.
|
| |
| static QVariant | asQVariant (T *ptr) |
| | Converts a typed pointer into a QVariant.
|
| |
template<typename T>
class VariantPointer< T >
A template utility class for converting between pointers and QVariant objects.
◆ asPtr()
Converts a QVariant containing a void pointer back to a typed pointer.
- Parameters
-
| v | The QVariant containing the pointer data. |
- Returns
- A pointer of type T.
◆ asQVariant()
Converts a typed pointer into a QVariant.
- Parameters
-
| ptr | The pointer to convert. |
- Returns
- A QVariant encapsulating the pointer.
The documentation for this class was generated from the following file: