Important: Please read the Qt Code of Conduct -

[SOLVED] How to connect QFileSystemWatcher Signals to SLOTS in derived QApplication

  • Hi!

    As the title might it possible to connect the QFileSysWatcher-SIGNALS to SLOT in a derived QApplication?

    @QObject::connect(FileWatcher, SIGNAL(fileChanged(QString)), this, SLOT(fileChangedSlot(QString)));@
    this is MyApplication, derived from QApplication. I always get the message that the SIGNALS and SLOTS could not connect. But why? Is it not possible?

    Thank you an have a nice weekend!

  • Lifetime Qt Champion


    Do you have the Q_OBJECT keyword in your derived QApplication ?
    Did you declare and implement the slot ?

  • Thank you! That's the problem. I've added Q_OBJECT in the header file before public, private.

    You helped me out. Stupid failure...i do not work with Qt since a time...

Log in to reply