Hi, i was wondering about how i can define own C++ methods for QML component.
class TimeModel : public QObject
{
Q_OBJECT
Q_PROPERTY(int hour READ hour NOTIFY timeChanged)
Q_PROPERTY(int minute READ minute NOTIFY timeChanged)
...
This is code example from documentation. Thereis defined properties, but i want to define method to which i will call later in QML code, like this:
TimeModel {
id: tm
}
..
tm.someMethod()
..
I didnt found Q_METHOD() in qt. Anny suggestions ??
↧