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. Signal slot question
Forum Updated to NodeBB v4.3 + New Features

Signal slot question

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 638 Views 2 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.
  • S Offline
    S Offline
    s002wjh
    wrote on last edited by
    #1

    Is this correct. I want pass data between 2 functions within different thread.

    Qobject::connect(&test, signal(test1(float *, int), &test2, slot(test2a(float *, into)))

    Test::test1(float *in, int in2)

    Test2::test2a(float *in, int in2)
    Test is in main thread and has its in widgets class
    Test 2 is Qobject and is in subthread

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

      Hi,

      The signal and slot macros are in the wrong casing. You should also consider using the new Qt 5 syntax.

      I see a pointer to a float parameter which is suspicious. Why are you using such a pointer ?

      Since you are talking about different threads, how you doing that ?

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

      S 1 Reply Last reply
      4
      • SGaistS SGaist

        Hi,

        The signal and slot macros are in the wrong casing. You should also consider using the new Qt 5 syntax.

        I see a pointer to a float parameter which is suspicious. Why are you using such a pointer ?

        Since you are talking about different threads, how you doing that ?

        S Offline
        S Offline
        s002wjh
        wrote on last edited by s002wjh
        #3

        @SGaist
        I plan to move thread for Qobject( I got thread working but the connect syntax is wrong and I'm not sure the correct way for functions with iO)
        If my syntax is wrong could you show me the correct syntax?

        The main thing I'm unsure is how to pass functions that's has io in connect

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

          @s002wjh said in Signal slot question:

          The main thing I'm unsure is how to pass functions that's has io in connect

          Im not sure what you mean by that ?
          In what way have IO in connect ?

          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