Q_ARG return type in Qt 6.5
-
According to the documentation here, Q_ARG should return a QGenericArgument; however, in my testing it is returning a QMetaMethodArgument.
The following simple line which worked in Qt 5.15:
QGenericArgument arg = Q_ARG(int,1);has an error in Qt 6.5, "No viable conversion from 'QMetaMethodArgument' to 'QGenericArgument'. What am I doing wrong, or is this a mistake in the docs?
-
According to the documentation here, Q_ARG should return a QGenericArgument; however, in my testing it is returning a QMetaMethodArgument.
The following simple line which worked in Qt 5.15:
QGenericArgument arg = Q_ARG(int,1);has an error in Qt 6.5, "No viable conversion from 'QMetaMethodArgument' to 'QGenericArgument'. What am I doing wrong, or is this a mistake in the docs?
This seems to be an oversight in the documentation - I would suggess creating a bug report so the documentation gets fixed.
-
According to the documentation here, Q_ARG should return a QGenericArgument; however, in my testing it is returning a QMetaMethodArgument.
The following simple line which worked in Qt 5.15:
QGenericArgument arg = Q_ARG(int,1);has an error in Qt 6.5, "No viable conversion from 'QMetaMethodArgument' to 'QGenericArgument'. What am I doing wrong, or is this a mistake in the docs?
@flatland3r
In any case, since the returned class is part of private API and not supposed to be used directly, I would suggestauto arg = Q_ARG(int,1);