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. Exchange data between qt thread and c++ thread
Forum Updated to NodeBB v4.3 + New Features

Exchange data between qt thread and c++ thread

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 831 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.
  • A Offline
    A Offline
    av2306
    wrote on last edited by
    #1

    Hi,

    Created Qt thread from c++ thread (not main thread and strand) and am ablne to pass the data through signal/slot to Qt thread. But, I could not pass data back from Qt thread to c++ thread. Any ideas?

    thanks.
    av.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Hi,
      To utilize the signal/slot the classes MUST be subclass of QObject. Without it, it will not work. The Qthread you made is probably lucky that the C++ is his parent, so it will connect to that, but giving data back means that the C++ thread should have an QObject part running, which it doesn't so it will not handle the events.

      Greetz, Jeroen

      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