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. QSocketNotifier: socket notifiers cannot be enabled from another thread
Forum Updated to NodeBB v4.3 + New Features

QSocketNotifier: socket notifiers cannot be enabled from another thread

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 816 Views 2 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.
  • S Offline
    S Offline
    seshu workemail
    wrote on last edited by
    #1

    I have a write(QByteArray write_data) function in the worker thread doing a socket->write(write_data).
    I want to trigger it from the main/gui thread function guiInfoToWorker() fnction which sends a QByteArray by emitting a signal with parameter a QByteAray.

    I am currently trying to achieve this using connect() in main.cpp which is throwing me errors:
    QSocketNotifier: socket notifiers cannot be enabled from another thread
    QSocketNotifier: socket notifiers cannot be disabled from another thread

    in both Qt::DirectConnection and Qt::QueuedConnection.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      How are you creating your QSocketNotifier ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - 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