Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Q_Property add range macros
Qt 6.11 is out! See what's new in the release blog

Q_Property add range macros

Scheduled Pinned Locked Moved Unsolved Language Bindings
2 Posts 2 Posters 826 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.
  • V Offline
    V Offline
    Vitaliy
    wrote on last edited by
    #1

    Hello!. I want to add a range to the property. Something like ... this:

    Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged MIN 0 MAX 100)
    
    

    Who can tell where to look or examples of the implementation of such?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, there's none. You need to implement your own macro on top Q_PROPERTY to do that.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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