On 3/7/25 12:48, Schimkowitsch Robert wrote:
There is "Q_PROPERTY(qreal x MEMBER m_x NOTIFY xChanged)" for the
really simple cases.
With that you don't need to write any accessors at all. Not even the bindable
accessor.
That neither does the change comparison, nor will it automatically notify about
changes.
It will.
You'd have to code both manually. I don't see a major improvement. Also, I
guess this forces me to make the members public.
Not really an alternative.
It won't, unless you need direct access. I just use a small wrapper
macro around Q_PROPERTY to get rid of the boilerplate in some places
where I have lots of trivial properties. It declares and defines the the
member (and initializes that), getter & setter and notification signal
all in one go. Do we love macros? No. Are they still useful sometimes?
Absolutely.
I am surprised by this proposal to back out QProperty essentially from
Qt. It was supposed to be one of the big selling points with Qt6. It was
rushed in at that point (and there were discussions about that), and now
it turns out it's not well enough thought-out to actually work, if I may
paraphrase Ulf.
Cheers,
André
Kind regards
Robert
________________________________
This message and any attachments are solely for the use of the intended
recipients. They may contain privileged and/or confidential information or
other information protected from disclosure. If you are not an intended
recipient, you are hereby notified that you received this email in error and
that any review, dissemination, distribution or copying of this email and any
attachment is strictly prohibited. If you have received this email in error,
please contact the sender and delete the message and any attachment from your
system.
ANDRITZ HYDRO GmbH
Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation
Firmensitz/ Registered seat: Wien
Firmenbuchgericht/ Court of registry: Handelsgericht Wien
Firmenbuchnummer/ Company registration: FN 61833 g
DVR: 0605077
UID-Nr.: ATU14756806
Thank You
________________________________
--
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development