[Solved] QAction setData with two data types
@QAction *act = new QAction("TEST");
But I can't set QVariant with two data types. I try with struct & class Object but still errors.
How can I do that?
Try @act.setData(QVariant(QMap<int, bool>))@
Or QList, since the first T is int.
So, can't make.
But, int is unique, so I use QList...
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.