PDA

View Full Version : Setting Custom defined classes to QVariant



node_ex
11th August 2010, 12:39
Hi,

I am trying to put a user defined class of which base class is QDialog into QVariant object inturn that can be saved to QAbstractItemModel.

But QVariant is not accepting it and throwing the error at third line.
" error: 'QVariant::QVariant(void*)' is private"

code:
nodeProperties* nprop; // nodeProperties is class derived from QDialog
nprop = new nodeProperties(this);
QVariant propVariant = nprop;

Regards,
node_ex.