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. For each QT-Creator one signal emitted
Forum Updated to NodeBB v4.3 + New Features

For each QT-Creator one signal emitted

Scheduled Pinned Locked Moved Solved General and Desktop
qt-creatorsignal & slot
5 Posts 2 Posters 815 Views 1 Watching
  • 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.
  • F Offline
    F Offline
    firen
    wrote on last edited by firen
    #1

    Hi,
    I have a general understanding problem:

    I have an application with two different user roles student/teacher. Both of them use QfileSystemwatcher to watch out for changes in some CSV-Files.
    Because both of them use the file in a different way, I wanted to run the app in two QT-Creator instances for debugging simultaneously.

    For every file which is changed, ann own signal is emitted by the watcher-class and I show for myself a qDebug() << "file xy was changed";

    My understanding-problem:

    If I have only one QT-Creator instance I see in this instance for each file change only one emitted signal .
    But if I have 2 QT-Creator instances I see every signal two times in one Qt-creator instance and with three instances I see every signal three times (in one QT-Creator instance). Why is this happening? I thought every signal would be only visible for the actual app in the actual QT-Creator instance and not in every QT-creator instance...

    This is for example my output in one QT-Creator debugger but 3 QT-Creators are running

    "CSVResults/results_per_user.csv was changed"
    "CSVResults/dfActivity.csv was changed"
    "CSVResults/TeacherProcAct.csv was changed"
    "CSVResults/TeacherProcAct.csv was changed"
    "CSVResults/assignments_overview.csv was changed"
    "CSVResults/results_per_user.csv was changed"
    "CSVResults/TeacherDiaTheoryTask.csv was changed"
    "CSVResults/dfActivity.csv was changed"
    "CSVResults/TeacherProcAct.csv was changed"
    "CSVResults/assignments_overview.csv was changed"
    "CSVResults/TeacherDiaTheoryTask.csv was changed"
    "CSVResults/TeacherDiaTheoryTask.csv was changed"
    "CSVResults/results_per_user.csv was changed"
    "CSVResults/dfActivity.csv was changed"
    "CSVResults/dfActivity.csv was changed"
    "CSVResults/TeacherProcAct.csv was changed"
    "CSVResults/assignments_overview.csv was changed"
    "CSVResults/TeacherDiaTheoryTask.csv was changed"
    "CSVResults/TeacherDiaTheoryTask.csv was changed"
    

    And now I see it is sometimes even more but it seems that it could be normal that it is not always one file change and one emitted signal be qfilesystemwatcher https://forum.qt.io/topic/124818/qfilesystemwatcher-sends-2-signals-is-there-anyway-to-avoid-that/6

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

      Hi,

      Is your application modifying these files in response to the signals coming from QFilesystemWatcher ?

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

      F 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Is your application modifying these files in response to the signals coming from QFilesystemWatcher ?

        F Offline
        F Offline
        firen
        wrote on last edited by
        #3

        @SGaist the teacher role starts a process who writes into the csv-files and both user roles (student and teacher) get different responses. They present the csv-content in different qml-diagrams.

        In this process each file is only written ones and not several times.

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

          Are you sure that this process is not started by all the instances of your application ?

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

          F 1 Reply Last reply
          0
          • SGaistS SGaist

            Are you sure that this process is not started by all the instances of your application ?

            F Offline
            F Offline
            firen
            wrote on last edited by
            #5

            @SGaist I was too sure I guess... :-)

            Thanks!

            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