Results 1 to 2 of 2

Thread: Can we make the signal calls synchronous??

  1. #1
    Join Date
    Feb 2009
    Posts
    16
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Can we make the signal calls synchronous??

    Hi,
    I have a query is whether can we make a signal call to be synchronous?
    Well the case is I am using QAbstractSocket API of waitForReadyRead(int msecs)
    which returns true or false based on whether there was an error in socket or timeout has happened. Actually if I have connected the error() of Socket then in case this API times out then the control goes to the error(since error signal from Socket class has been emitted) but I need to get the value as true or false in the API itself else I have to write a really complex logic for controlling the code flow. Is it possible to make it sort of synchronouse that the control doesnt go to the slot.

    Regards,
    Yogesh

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Can we make the signal calls synchronous??

    Signals are neither synchronous nor asynchronous. It's the slots that might be one of the two. Slots are by default synchronous when the object emitting the signal and the object having the receiving slot both live in the same thread.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. pthread instead QThread
    By brevleq in forum Qt Programming
    Replies: 8
    Last Post: 23rd December 2008, 07:16
  2. Connection of custon signals/slots
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 23rd December 2008, 07:04
  3. how to make system calls to be displayed in QLineEdit
    By wagmare in forum Qt Programming
    Replies: 2
    Last Post: 10th November 2008, 05:08
  4. Window OS make distclean && qmake && make one line
    By patrik08 in forum General Programming
    Replies: 4
    Last Post: 22nd March 2007, 10:43
  5. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.