Results 1 to 9 of 9

Thread: Qbytearrays do not function with big arrays?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2018
    Posts
    26
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Qbytearrays do not function with big arrays?

    What is wrong with my code?

    QbytesArray bufferFile;
    QbytesArray buffer;
    int receiveBytes, size;
    …

    receivedBytes += size;
    bufferFile.resize(receivedBytes);
    bufferFile.push_back(buffer.data()); \\ or bufferFile.push_back(buffer) which generates the same result

    I am working with Qbytearray of around 100000 length. The reason why I have opted for qbytesArray is what I expect that I do not have
    to allocate that big array of unsigned characters beforehand.


    For some reason I tried to resize that qbytearray to accomodate some new data arrived from the socket.. Unfortunately on my debugger I have seen that
    new characters are added (205 or 'Í') and even more the number of added characters is not what I expects...? It seems to me that nearly all data from
    qt 5.11.0 - msvc 2017 c++ are gone.


    What I doing wrong?
    Last edited by Pereubu2018; 20th July 2018 at 12:56.

Similar Threads

  1. Arrays in QScript
    By tsrplatelayer in forum Newbie
    Replies: 3
    Last Post: 6th March 2015, 12:12
  2. Arrays With Designer?
    By Erich in forum Newbie
    Replies: 5
    Last Post: 20th August 2010, 15:53
  3. arrays + QtDesigner
    By p_t3r in forum Qt Tools
    Replies: 0
    Last Post: 8th December 2009, 00:33
  4. QtScript and arrays
    By supergillis in forum Qt Programming
    Replies: 1
    Last Post: 20th May 2009, 19:13
  5. Widget Arrays?
    By sekatsim in forum Qt Programming
    Replies: 6
    Last Post: 13th June 2008, 02: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.