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. QueuedConnection problem
Forum Updated to NodeBB v4.3 + New Features

QueuedConnection problem

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

    I'm developing a QT project for Windows. In that project I've a multimedia timer executing some operations an sending some signals.

    In MainWindow class I connect slots to signals.

    My requirement is to let the emit function to be non-blocking so QueuedConnection should be my solution.

    If the connect is done as QueuedConnection, the slot is not called.
    If the connect is done as AutoConnection, the slot is called and the app works fine.

    Can multimedia timers create problems to the QT signal/slot mechanism when connection is Queued?

    Otherwise, what could be the problem ?

    Thanks a lot !

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on last edited by
      #2

      If you use a queued connection, the thread to which the "receiving" object belongs needs to be running an event loop (that's because the event loop will fetch the signal from the queue and call the slot function). Are you 100% sure this is the case in your app? Normally your "main" (GUI) thread will be running an event loop (usually via QApplication::exec() called from your "main" function). Then sending signals over a queued connection from "background" threads to the objects that live in the "main" thread should work fine...

      (BTW: Maybe it would be helpful if you give some implementation details about your "multimedia timer")

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      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