Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How do I use QT connect (SIGNAL/SLOT) with QT thread operation?
Forum Updated to NodeBB v4.3 + New Features

How do I use QT connect (SIGNAL/SLOT) with QT thread operation?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 3 Posters 985 Views
  • 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.
  • N Offline
    N Offline
    NTCYP
    wrote on last edited by
    #1

    Hi,

    I have a RFID Reader and Mifare RFID card. I need some kind automation for the card reader and each card presented to reader it must be run in separate thread. So I thought below design is the basic solution for my project.

    1. RFID Reader waits for to Mifare RFID card to presented
    2. When Mifare RFID card is present, the reader connects to the card
    3. Read/write/update operation
    4. Disconnect from card
    5. RFID reader waits another card to presented

    I need my reader to always in waiting mode kind of always to be listen if any card presented. Then if card is presented I need to connect the card. Do some CRUD operation. And disconnect from the card. I am thinking to use SIGNAL/SLOT connect and disconnect with some threading operation. But I don’t know how to use QT connect/disconnect (SIGNAL/SLOT) with QT Threading. How do I use QT connect (SIGNAL/SLOT) with QT thread operation?

    Kind Regards,

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Lazar Urosevic
      wrote on last edited by
      #2

      Hey @NTCYP this worked for me :)

      1 Reply Last reply
      0
      • jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Use Qt::QueuedConnection as connection type when you call connect(...), then it will work across threads.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        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