Results 1 to 12 of 12

Thread: Char array[6] to QString and display it

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    9

    Default Re: Char array[6] to QString and display it

    I read QString Docs, But I don't see any thing which converts array to QString.

    Please let me know how to convert it.

    Thanks,
    Arun

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Char array[6] to QString and display it

    Do you know the relation between char[] and char*?
    J-P Nurmi

  3. #3
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    9

    Default Re: Char array[6] to QString and display it

    Thanks to all it solved now.

  4. #4
    Join Date
    Jan 2008
    Posts
    72
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60
    Thanks
    3
    Thanked 4 Times in 4 Posts

    Cool Re: Char array[6] to QString and display it

    char chararray [15];
    QString theqstring ("This is a character array");

    strcpy (chararray, theqstring.latin1());

    Using this u can convert QString to char[]

  5. #5
    Join Date
    Dec 2008
    Posts
    2
    Platforms
    Unix/X11

    Default Re: Char array[6] to QString and display it

    hi i am a Qtforum user
    i am also suffering from same problem like you
    can you tell me how did you solved ur proble
    plz..
    i need to display hex data array(char type) in QLabel

    waiting for ur reply
    thanks in advance

  6. #6
    Join Date
    Mar 2014
    Posts
    1
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Post Re: Char array[6] to QString and display it

    Quote Originally Posted by arunvv View Post
    Thanks to all it solved now.
    Hi... Can you please tell me how you solved this issue ??? as i also need to do the same thing....

  7. #7
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Char array[6] to QString and display it

    What have you actually tried? What do you actually have as input? This thread contains a solution and some hints.

Similar Threads

  1. Display '<' as HTML in QString
    By mclark in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2007, 21:43

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.