Results 1 to 3 of 3

Thread: Should Q_PROPERTY always be CONSTANT or NOTIFY?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Should Q_PROPERTY always be CONSTANT or NOTIFY?

    According the qt doc you posted the notify signal is optional so you're good like that, that should be just a warning. If you want to ger rid of that warning, just add a notify signal, even if you dont need it

    Qt Code:
    1. Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
    2.  
    3. // you have to declare the notify signal
    4. signals:
    5. void nameChanged(int newName);
    To copy to clipboard, switch view to plain text mode 
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  2. The following user says thank you to john_god for this useful post:

    tuli (24th November 2022)

Similar Threads

  1. Can't get the notify signal in QML
    By iveus in forum Newbie
    Replies: 2
    Last Post: 8th February 2020, 11:43
  2. Replies: 9
    Last Post: 17th August 2015, 17:52
  3. Constant Grid
    By myzinsky in forum Qwt
    Replies: 4
    Last Post: 5th September 2012, 11:48
  4. linux usb notify
    By duckshine in forum General Programming
    Replies: 1
    Last Post: 27th May 2011, 10:16
  5. Qt web notify
    By bunjee in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 13:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.