Hmm... I even told you what function you were to reimplement

Qt Code:
  1. class Conversions : public QObject {
  2. Q_OBJECT
  3. public:
  4. Conversions(QObject *parent = 0) : QObject(parent) {}
  5. public slots:
  6. int time_ms_to_sec(int val = -1) {
  7. return val == -1 ? -1 : (val / 1000);
  8. }
  9. };
  10.  
  11. void TestPlugin::initializeEngine(QDeclarativeEngine *engine, const char *url) {
  12. engine->rootContext()->setContextProperty("Conversions", new Conversions(engine));
  13. }
To copy to clipboard, switch view to plain text mode