1. Declare function:
void setItemColor(int red, int green, int blue, int alpha);
void setItemColor(int red, int green, int blue, int alpha);
To copy to clipboard, switch view to plain text mode
as a public slot.
2. Make the object available for your script:
engine->globalObject().setProperty("myObject", engine->newQObject(myObject));
engine->globalObject().setProperty("myObject", engine->newQObject(myObject));
To copy to clipboard, switch view to plain text mode
3. And use it this way in script:
myObject.setItemColor(255, 0, 0, 0);
myObject.setItemColor(255, 0, 0, 0);
To copy to clipboard, switch view to plain text mode
Bookmarks