Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. size() and constData() of QByteArray
Qt 6.12 LTS is out! See what's new in the release blog

size() and constData() of QByteArray

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 397 Views
  • 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.
  • J Offline
    J Offline
    jgxy1123
    wrote on last edited by
    #1

    The result of what I tried in VS is different from QT document, even though I just copied the codes from Qt Document.

    - What I tried and result
    ae5658d2-e016-4c92-8b17-ce26eb26ea81-image.png
    31834441-3fd0-4538-9d6a-8417f5d4fb14-image.png

    - Qt Document
    cb69d66c-6063-47ab-9415-f51b74444407-image.png

    B 1 Reply Last reply
    0
    • J jgxy1123

      The result of what I tried in VS is different from QT document, even though I just copied the codes from Qt Document.

      - What I tried and result
      ae5658d2-e016-4c92-8b17-ce26eb26ea81-image.png
      31834441-3fd0-4538-9d6a-8417f5d4fb14-image.png

      - Qt Document
      cb69d66c-6063-47ab-9415-f51b74444407-image.png

      B Offline
      B Offline
      Bonnie
      wrote on last edited by Bonnie
      #2

      @jgxy1123 No, it is not different. The document doesn't tell you to print the result by qDebug(). It stops printing when meets \0 while handling const char *.

      J 1 Reply Last reply
      3
      • B Bonnie

        @jgxy1123 No, it is not different. The document doesn't tell you to print the result by qDebug(). It stops printing when meets \0 while handling const char *.

        J Offline
        J Offline
        jgxy1123
        wrote on last edited by
        #3

        @Bonnie Understood! thank you for your help!

        1 Reply Last reply
        0
        • J jgxy1123 has marked this topic as solved on

        • Login

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