Results 1 to 3 of 3

Thread: Issue with writing to QValueSpaceItem

  1. #1
    Join Date
    Oct 2024
    Posts
    1
    Qt products
    Qt/Embedded
    Platforms
    Android

    Default Issue with writing to QValueSpaceItem

    Hello,
    I have an issue. Writing to QValueSpaceItem is very slow as if something has blocked the executing. Here is the code:

    void QCommDeviceController_Private::bringUp()
    {
    if (!m_sock)
    return;

    m_sock->write("UP\r\n");
    }

    There is no contentChanged signal for a long time.
    Is there anyone having the same issue? How to fix it?

  2. #2
    Join Date
    Jan 2025
    Posts
    2
    Qt products
    PyQt3 PyQt4
    Platforms
    Windows

    Default Re: Issue with writing to QValueSpaceItem

    Make sure the socket (m_sock) is in a valid state before calling write. The write function does not perform the write immediately, instead among us queues it into the event loop.

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,270
    Thanks
    308
    Thanked 868 Times in 855 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Issue with writing to QValueSpaceItem

    You may also need to call flush() to force the buffer to actually be written to the socket.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. writing mp3 headers
    By azazaz in forum Qt Programming
    Replies: 0
    Last Post: 15th June 2016, 09:36
  2. Replies: 1
    Last Post: 8th August 2015, 07:42
  3. writing txt to template
    By terhje in forum Qt Programming
    Replies: 1
    Last Post: 6th June 2011, 15:08
  4. Need help writing my first Qt app
    By netnut in forum Newbie
    Replies: 4
    Last Post: 16th December 2010, 11:52
  5. QValueSpaceItem and QUnixSocket Issue?
    By blackfox in forum Qt Programming
    Replies: 0
    Last Post: 8th October 2008, 10:02

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.