Wrong enum value from QSettings using Qt 6
Solved
General and Desktop
-
@J-Hilk said in Wrong enum value from QSettings using Qt 6:
@Cobra91151 did you also use
Q_ENUM_NS
orQ_ENUM
if your declaration is inside a QObject class?cough 🤓
might be in it since the beginning of Qt6 ? because I don't remember it ever working without the Q_ENUM macro?
@J-Hilk said in Wrong enum value from QSettings using Qt 6:
because I don't remember it ever working without the Q_ENUM macro?
It worked in Qt5 so it's a Qt6 regression. And it is very surprising because QVariant<int>() properly converts to an enum whereas QVariant<QString>() did not.
-
J JonB referenced this topic on