Results 1 to 5 of 5

Thread: int to String Conversion

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Netherlands
    Posts
    56
    Thanks
    10
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: int to String Conversion

    Quote Originally Posted by Lykurg View Post
    What's new in your answer? But anyway, it makes no sens to convert the QChar to char before assigning it to a QString, since QString will convert it back. So this conversion is useless.
    You are absolutely right

    it should be:
    Qt Code:
    1. int iAscii_Val = 65;
    2. QString strAscii = QChar(iAscii_Val);
    To copy to clipboard, switch view to plain text mode 

    The reason I answered was just to be helpful for other people that are struggling with it ( and now have some cut 'n' paste code they can use )
    Last edited by BrainB0ne; 4th December 2009 at 23:01.
    ..:: Still Standing Strong ::..

Similar Threads

  1. Using ANSI string type
    By kahahn in forum Newbie
    Replies: 1
    Last Post: 20th June 2009, 23:52
  2. Replies: 0
    Last Post: 18th February 2009, 13:31
  3. Conversion Char Array to string
    By anafor2004 in forum Newbie
    Replies: 6
    Last Post: 6th May 2008, 14:35
  4. saving a c string of variable length in a shared memory?
    By nass in forum General Programming
    Replies: 4
    Last Post: 3rd January 2007, 14:40
  5. Create pixmap image from string
    By Morea in forum Qt Programming
    Replies: 5
    Last Post: 17th November 2006, 16:38

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
  •  
Qt is a trademark of The Qt Company.