Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QString to char* without converting
QtWS25 Last Chance

QString to char* without converting

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 359 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.
  • A Offline
    A Offline
    Acrobat
    wrote on last edited by
    #1

    Hey. How to convert a QString to char *, in other words how to get to the data without conversion data? Get the data as they are.

    1 Reply Last reply
    0
    • m.sueM Offline
      m.sueM Offline
      m.sue
      wrote on last edited by m.sue
      #2

      Hi,
      as long as the internal structure does not change you can use the function utf16() for that. This is what you can call the win32 API *W functions with directly.
      If you want to stay within Qt you can use the data() function that returns a QChar* pointer which essentially is also a wrapper for an UTF16 character.
      -Michael.

      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