Results 1 to 16 of 16

Thread: QMetaObject use in visual studio (or "asyncronous QSocketNotifier use")

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2014
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMetaObject use in visual studio (or "asyncronous QSocketNotifier use")

    There is really no point in calling waitForReadyRead() in the slot connected to the socket's readyRead() signal.
    O rly? I was wondering about that. I had an issue in which two transmissions of data would somehow, in the same time frame, be read instead of one. Only 25 bytes is coming from my microcontroller, but when I put in the waitForReadyRead(...), it read 50 bytes.

    I should note that the waitForReadyRead(...) call was necessary to retrieve data at all when I ran the program in Visual Studio recently. I must have inadvertently "crossed some wires", so to speak. I'll try to do without, although I'd like to know how that function works and what it is linked such that it read twice.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: QMetaObject use in visual studio (or "asyncronous QSocketNotifier use")

    Well, "wait for read read" does what its name suggests

    It waits until readyRead() is emitted.

    In your case you are getting the slot called on a readyRead() emission and then wait for a second one.

    Cheers,
    _

  3. #3
    Join Date
    May 2014
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QMetaObject use in visual studio (or "asyncronous QSocketNotifier use")

    I suspected that might be the case. Thanks for the confirmation.

Similar Threads

  1. Replies: 1
    Last Post: 15th September 2013, 09:49
  2. error "cmd.exe" exited with code 1 in visual studio 2010
    By cactus0830 in forum Installation and Deployment
    Replies: 1
    Last Post: 22nd June 2013, 05:25
  3. Replies: 1
    Last Post: 14th May 2011, 09:02
  4. Replies: 1
    Last Post: 10th March 2011, 15:40
  5. Qmake DLLDESTDIR, Visual Studio "clean solution"
    By SiLiZiUMM in forum Installation and Deployment
    Replies: 4
    Last Post: 18th March 2008, 13:14

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.