
Originally Posted by
yogeshgokul
This is returning a name less empty object. So no probs !!
Thank you for replying!
What do you mean by empty object?
In Qt doc:
QVariant::QVariant ()
Constructs an invalid variant.
In Qt source code:
struct Private
{
inline Private(): type(Invalid), is_shared(false), is_null(true) { data.ptr = 0; }
inline Private(const Private &other)
: data(other.data), type(other.type),
is_shared(other.is_shared), is_null(other.is_null)
{}
union Data
{
char c;
int i;
uint u;
bool b;
double d;
qlonglong ll;
qulonglong ull;
void *ptr;
PrivateShared *shared;
} data;
uint type : 30;
uint is_shared : 1;
uint is_null : 1;
};
struct Private
{
inline Private(): type(Invalid), is_shared(false), is_null(true) { data.ptr = 0; }
inline Private(const Private &other)
: data(other.data), type(other.type),
is_shared(other.is_shared), is_null(other.is_null)
{}
union Data
{
char c;
int i;
uint u;
bool b;
double d;
qlonglong ll;
qulonglong ull;
void *ptr;
PrivateShared *shared;
} data;
uint type : 30;
uint is_shared : 1;
uint is_null : 1;
};
To copy to clipboard, switch view to plain text mode
I deduce that the QVariant() is not empty.It at least contains type of which value is Invalid!
Bookmarks