On Friday, 7 March 2025 03:51:23 Pacific Standard Time Volker Hilsheimer via
Development wrote:
> class Object : public QObject
> {
> Q_OBJECT
> Q_PROPERTY(value)
It would be easier to keep the current syntax with READ, WRITE, NOTIFY and
then add an extra boolean field that tells moc to implement the getter and
setter.
> public:
> // ~~~
>
> int value() const;
> void setValue() const;
>
> signals:
> void valueChanged();
> };
Or something like:
class Object : public QObject
{
Q_OBJECT
public:
Q_PROPERTY_FULL(int, READ, int value() noexcept,
WRITE, void setValue(int),
NOTIFY, void valueChanged())
};
It shouldn't be too difficult to make the macro output all positive even-
numbered fields into the header. Or if we can find a way to insert a prefix
that
then turns the word into a macro that expands to empty:
Q_PROPERTY_FULL(int, READ int value() noexcept,
WRITE void setValue(int),
NOTIFY void valueChanged())
--
Thiago Macieira - thiago.macieira (AT) intel.com
Principal Engineer - Intel DCAI Platform & System Engineering
smime.p7s
Description: S/MIME cryptographic signature
-- Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
