Results 1 to 10 of 10

Thread: Q_PROPERTY compile problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Aug 2010
    Posts
    65
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    5

    Default Re: Q_PROPERTY compile problem

    Wait, in the examples in the doc (http://doc.trolltech.com/latest/prop...simple-example), the member is given in the Q_PROPERTY line and never again.
    Qt Code:
    1. Q_PROPERTY(Priority priority READ priority WRITE setPriority)
    To copy to clipboard, switch view to plain text mode 
    It later defines the enum type Priority, but doesn't create a member priority.
    So, as I understand, the macro already creates the data member.

    As well, should I uncomment the original data members (which are commented in the given header), it compiles just fine, as stated in the OP. However, the signal is not emitted. Even if the value is altered via the WRITE function.

    I mean, I'm not supposed to manually emit() the signal from within the WRITE function, right? That's precisely what the NOTIFY keyword is supposed to do for me, right?

    EDIT: Just read this, which cleared my doubt regarding the variable declaration, but there's still the issue of the signal not being emitted.
    Last edited by Wasabi; 7th January 2011 at 16:51.

Similar Threads

  1. how to implement QApplication.notify()
    By di_zou in forum Newbie
    Replies: 1
    Last Post: 15th February 2010, 18:12
  2. QApplication::notify()
    By jeffpogo in forum Qt Programming
    Replies: 1
    Last Post: 16th June 2009, 22:46
  3. Qt web notify
    By bunjee in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 13:24
  4. Why and when to use Q_PROPERTY
    By Vanir in forum Qt Programming
    Replies: 4
    Last Post: 22nd November 2007, 09:25
  5. How to Use Q_PROPERTY
    By mitesh_modi in forum Qt Programming
    Replies: 7
    Last Post: 20th June 2006, 14:49

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.