Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

C++ QML Integration Demo App

 #include "myqmltype.h"

 MyQMLType::MyQMLType() : m_message("")
 {

 }

 int MyQMLType::increment(int value) {
   return value + 1;
 }

 void MyQMLType::startCppTask() {
   this->doCppTask();
 }

 void MyQMLType::doCppTask() {
   // NOTE: you can do calculations here in another thread, this may be used to perform
   // cpu-intense operations for e.g. AI (artificial itelligence), Machine Learning or similar purposes
   // When the work is done, we can trigger the cppTaskFinished signal and react anywhere in C++ or QML
   emit cppTaskFinished();
 }

 QString MyQMLType::message() const {
   return m_message;
 }

 void MyQMLType::setMessage(const QString& value) {
   if(m_message != value) {
     m_message = value;
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded