Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved how to split a Qstring

    General and Desktop
    2
    2
    222
    Loading More Posts
    • 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.
    • sankarapandiyan
      sankarapandiyan last edited by VRonin

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • V
        VRonin last edited by

        As explained here you should use QDataStream to safely serialise your data. It looks like you are assuming that readAll() reads 1 and exactly 1 "data point" but that's not the case, readAll() reads everything that's on the serial, it could be 1, 100 or even a partial piece of data

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        1 Reply Last reply Reply Quote 4
        • First post
          Last post