Signal slot question



  • 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


  • Lifetime Qt Champion

    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 ?



  • @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


  • Qt Champions 2017

    @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 ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.