Hello,
I have a class in which I would like my Q_PROPERTY READ function to accept an argument. Here is my code:
class Simple : public QObject {
Q_OBJECT
Q_PROPERTY(QObject* apples READ getApples)
public:
QObject * getApples(int index);
};
I always get a compiler error that says:
no matching function for call to ‘Simple::getApples()’
QObject * Simple::getApples(int)
note: candidate expects 1 argument, 0 provided
So it seems that it is looking for a function without arguments. Is it possible to have a READ function take arguments?
Thank you
↧