Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. It is a bug?
Forum Updated to NodeBB v4.3 + New Features

It is a bug?

Scheduled Pinned Locked Moved C++ Gurus
3 Posts 2 Posters 2.0k Views 1 Watching
  • 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.
  • P Offline
    P Offline
    Paco
    wrote on last edited by
    #1

    Sorry if it's not the good discution here but I don't find the good one.

    I juste need to report something,
    I use a QString, I translate it with .toAscii(). So now I have a QByteArray and everything is good.
    I need a char* so I use .data() and after this method, the first caractere is changed and on vi it's ^@.
    I don't know exactly what is this caractere. So in my case, the data function make a bad thing and I don't find something in the documentation.

    I can't keep this problem for me in case of it's a bug and not a bad manipulation.

    Thanks

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      No, it is not a bug in Qt, it is a bug in your code. And this has been discussed before many times here. It is also explained in the "FAQ":http://developer.qt.nokia.com/faq/answer/how_can_i_convert_a_qstring_to_char_and_vice_versa.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        Paco
        wrote on last edited by
        #3

        Ok thank you, I got it now.

        Best regards

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved