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. How to use non ui signals/slots?
Qt 6.11 is out! See what's new in the release blog

How to use non ui signals/slots?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.2k 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.
  • H Offline
    H Offline
    haxxe
    wrote on last edited by
    #1

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

    connect(can,SIGNAL(framesReceived()),this,SLOT(receiveFrames()));
    

    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

    mrjjM 1 Reply Last reply
    0
    • H haxxe

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

      connect(can,SIGNAL(framesReceived()),this,SLOT(receiveFrames()));
      

      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

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

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

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

      1 Reply Last reply
      0
      • H Offline
        H Offline
        haxxe
        wrote on last edited by
        #3

        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 !

        mrjjM 1 Reply Last reply
        0
        • H haxxe

          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 !

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

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

          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