Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. struct enum qml
Qt 6.11 is out! See what's new in the release blog

struct enum qml

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 336 Views 1 Watching
  • 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.
  • D Offline
    D Offline
    damianatorrpm
    wrote on last edited by
    #1

    Can I expose the enum of a struct marked as Q_GADGET and the enum with Q_ENUM to qml?

    qmlRegisterType<IsNowStruct>("IsNowStruct", 1, 0, "IsNowStruct"); // works if it s class, fails if it is struct.
    
    1 Reply Last reply
    0
    • D Offline
      D Offline
      damianatorrpm
      wrote on last edited by
      #2

      I found that it still has to be a QObject derived type.

      1 Reply Last reply
      0

      • Login

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