Skip to content
QtWS25 Last Chance
  • forward use of Q_ENUM

    Solved General and Desktop qenum
    3
    0 Votes
    3 Posts
    220 Views
    A
    @SGaist Thanks. Sometimes we do not think about the simplest solutions.
  • QMetaEnum::fromType always -1 in debugger

    Unsolved General and Desktop qmetaenum qenum
    6
    0 Votes
    6 Posts
    3k Views
    kshegunovK
    @Joel-Bodenmann Okay, this is a curious thing. I'd try some debugging of the QMetaEnum in debug mode, to see what the problem might be; something like this: QMetaEnum myEnum = MetaEnum::fromType<LibraryItem::Type>(); if (!myEnum.isValid()) qDebug() << myEnum.name() << " is invalid with scope " << myEnum.scope(); for (qint32 i = 0, count = myEnum.keyCount(); i < count; i++) qDebug() << myEnum.key(i); Try it out and see what is printed in the debug window.