How to use non ui signals/slots?

  • Hi,
    i just wanted to try the frameReceived() signal from qcanbus.
    But how to do it?
    I tried it this way:


    can is my QCanBus device.
    But the programm keeps crashing at the start.
    i want to receive some frames, then jump to my receiveFrames function to read it.
    Is this a possibility to avoid threads? im not good with threads either (qt noobie, but lover :) )
    thanks in advance

  • Qt Champions 2016

    @haxxe said in How to use non ui signals/slots?:

    it seems right.

    can is a pointer to QCanBusDevice that you have new'ed, correct ?

    Could you use the debugger and find the line it crashes on ?

  • My bad, i new it when i click a button, therefore there is no can before the program starts. after putting the initpart before,it works.
    Thanks !

  • Qt Champions 2016

    I imagined something like that.
    Please mark as solved if possible.

Log in to reply

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