Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Q_Property add range macros

    Language Bindings
    2
    2
    541
    Loading More Posts
    • 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
      Vitaliy last edited by

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 1
        • First post
          Last post