QVariant 存放指针

QVariant v = QVariant::FromValue((void *) yourPointerHere);
yourPointer = (YourClass *) v.value<void *>();

你可能感兴趣的:(QVariant 存放指针)