Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-60355

QMetaEnum docs have no code examples

XMLWordPrintable

    • 3f6b128d7 (dev), 59314a160 (6.10), 24864285e (6.9)

      http://doc.qt.io/qt-5/qmetaenum.html#details doesn't have a single code example. The detailed description doesn't even mention that fromType() is the first function you need to call to actually get a QMetaEnum. This makes it necessary to go elsewhere (e.g. Stack Overflow) to find out how to use it.

      The most common question is how to get a string from an enum value, which this question answers:

      http://stackoverflow.com/a/34282031/904422

      We should have a similar snippet in the detailed description (including the Q_ENUM part).

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            dheerendra Dheerendra Purohit
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes