Wireshark
4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
ui
qt
utils
variant_pointer.h
Go to the documentation of this file.
1
14
#ifndef UI_QT_VARIANT_POINTER_H_
15
#define UI_QT_VARIANT_POINTER_H_
16
17
#include <QVariant>
18
19
template
<
typename
T>
class
VariantPointer
20
{
21
22
public
:
23
static
T* asPtr(QVariant v)
24
{
25
return
(T *) v.value<
void
*>();
26
}
27
28
static
QVariant asQVariant(T* ptr)
29
{
30
return
QVariant::fromValue((
void
*) ptr);
31
}
32
};
33
34
#endif
/* UI_QT_VARIANT_POINTER_H_ */
VariantPointer
Definition
variant_pointer.h:20
Generated by
1.9.8