Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] How to connect QFileSystemWatcher Signals to SLOTS in derived QApplication
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • jensen82J Offline
    jensen82J Offline
    jensen82
    wrote on last edited by
    #1

    Hi!

    As the title might say...is 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!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • jensen82J Offline
        jensen82J Offline
        jensen82
        wrote on last edited by
        #3

        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...

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved