Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
@QAction *act = new QAction("TEST"); act.setData(QVariant(int, bool));@
But I can't set QVariant with two data types. I try with struct & class Object but still errors.
How can I do that? Thanks
Try @act.setData(QVariant(QMap<int, bool>))@
Or QList, since the first T is int.
@QMap<String,int>@ So, can't make.
But, int is unique, so I use QList...
Thanks
QVariant holds one value, so you can not stuff two things into it.
You might try a QPair to group two separate things into one entity.