How to send signal from c++ when a file exists to qml??



  • How to send signal from c++ when a file exists to qml??

    I need like this
    /*
    For eg:

     QObject *item = view.rootObject();
    
        MyClass myClass;
       
        if(QFile::exists("C:/Games/file.txt"))
       {
        QObject::connect(item, SIGNAL(qmlSignal(QString)),
                         &myClass, SLOT(cppSlot(QString)));
      }
    

    Any suggestions to solve this??


  • Moderators


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.