Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Wrong enum value from QSettings using Qt 6
QtWS25 Last Chance

Wrong enum value from QSettings using Qt 6

Scheduled Pinned Locked Moved Solved General and Desktop
21 Posts 6 Posters 3.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J.HilkJ J.Hilk

    @Christian-Ehrlicher

    @J-Hilk said in Wrong enum value from QSettings using Qt 6:

    @Cobra91151 did you also use Q_ENUM_NS or Q_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?

    Christian EhrlicherC Online
    Christian EhrlicherC Online
    Christian Ehrlicher
    Lifetime Qt Champion
    wrote on last edited by
    #21

    @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.

    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
    Visit the Qt Academy at https://academy.qt.io/catalog

    1 Reply Last reply
    0
    • JonBJ JonB referenced this topic on

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved