Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8891

Slots are not called if signal is emitted from different thread and the signal/slot argument is user-defined class/struct

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.6.2
    • Core: Threads
    • None

      When user defines some class/struct that wants to be used as signal/slot parameter
      lets say
      class MyStruct
      {
      public:
      QString mMember;
      };

      then if it is passed between slot and signals from two differen threads, then the slot function will not called

      In attachment sample code that reproduces the issue

      slot
      void MyWidget::someStructSlot( const SomeStruct & )
      {
      cout << "received someStructSlot" << endl;
      }

      will never be called,

      The issue does not occur when slot/signal are from the same thread

        1. source.zip
          2 kB
          Grzegorz Wolszczak
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            grzechu81 Grzegorz Wolszczak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes