[Qt-creator] Q_PROPERY magic goodness
Jason H
scorp1us at yahoo.com
Fri Feb 14 01:13:08 CET 2014
Oooh never knew that one! Thanks!
----- Original Message -----
From: Kevin Krammer <kevin.krammer at kdab.com>
To: qt-creator at qt-project.org
Cc:
Sent: Thursday, February 13, 2014 8:46 AM
Subject: Re: [Qt-creator] Q_PROPERY magic goodness
On Wednesday, 2014-02-12, 07:26:24, Jason H wrote:
> Would it be possible to have in addition to the Q_PROPERTY completion
> template, to add the member, and getter, and setter in the class?
>
>
> Q_PROPERTY(int emitRate READ emitRate WRITE setEmitRate)
Just in case:
There is a variation of Q_PROPERTY which only requires you to declare the
member and, optionally, the notification signal
Q_PROPERTY(int emitRate MEMBER m_emitRate NOTIFY emitRateChanged)
and
private:
int m_emitRate;
Q_SIGNALS:
void emitRateChanged();
Cheers,
Kevin
--
Kevin Krammer | kevin.krammer at kdab.com | Senior Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
_______________________________________________
Qt-creator mailing list
Qt-creator at qt-project.org
http://lists.qt-project.org/mailman/listinfo/qt-creator
More information about the Qt-creator
mailing list