Results 1 to 9 of 9

Thread: CString realized as QString

  1. #1
    Join Date
    Jan 2006
    Posts
    55
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Smile CString realized as QString

    I have to change my platform from windows to unix,and I choice qt to replace
    MFC,but i don't want to change my code where using CString. Who can provide
    such a class? thanks a lot!

  2. #2
    Join Date
    Jan 2006
    Posts
    46
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: CString realized as QString

    If you're wroking with Qt3 you can use QCString class, and if you are using Qt4 this may help you.


    Hope it helps.

    Cheers.
    Kandalf
    There's no place like ~

  3. #3
    Join Date
    Jan 2006
    Posts
    55
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: CString realized as QString

    I use qt3.3.4. i will check it as you told me.thanks !

  4. #4
    Join Date
    Jan 2006
    Posts
    55
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Unhappy Re: CString realized as QString

    I have view the class QCString. Still there are difference between MFC's CString and QCString. For example, CString have a function named Format(),and QCString
    don't have.maybe i have to write a class named QMyCSting inherited from QCString to realize these functions?

  5. #5
    Join Date
    Jan 2006
    Location
    Moscow, Russia
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: CString realized as QString

    Why QCString? CString support unicode if UNICODE macro is defined. May be you should use QString because it support unicode too.

  6. #6
    Join Date
    Jan 2006
    Posts
    55
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: CString realized as QString

    sure, I mention this too.and the trolltech's document tells QCString exist shortcoming.The Document describes as below:"QCString tries to behave like a more convenient const char *. The price of doing this is that some algorithms will perform badly".And trolltech recommends to use QString

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: CString realized as QString

    Quote Originally Posted by coralbird
    I have to change my platform from windows to unix,and I choice qt to replace
    MFC,but i don't want to change my code where using CString.
    You might be interested in these links:
    http://www.trolltech.com/products/qt/migrate/mfc.html
    http://www.trolltech.com/products/so.../qtwinmigrate/

  8. #8
    Join Date
    Jan 2006
    Posts
    55
    Thanks
    13
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: CString realized as QString

    thanks to all.I have begin to realize the CString,after done this,if anyone need
    this,please post here,i will upload

  9. #9
    Join Date
    Jul 2007
    Posts
    1
    Qt products
    Qt3
    Platforms
    MacOS X Unix/X11

    Default Re: CString realized as QString

    If you have finished your CString class and if you are still OK to give it, thank you

Similar Threads

  1. Custom Model Advice Requested
    By mclark in forum Qt Programming
    Replies: 3
    Last Post: 18th September 2008, 16:26
  2. QString static callback function from CURL
    By tpf80 in forum Qt Programming
    Replies: 12
    Last Post: 16th May 2007, 20:47
  3. Convert from iso-8859-1 to... Something else :-)
    By Nyphel in forum Qt Programming
    Replies: 4
    Last Post: 7th March 2007, 17:59
  4. Converting QString to unsigned char
    By salston in forum Qt Programming
    Replies: 3
    Last Post: 24th April 2006, 22:10
  5. [SOLVED] Widget plugin ... how to ?
    By yellowmat in forum Newbie
    Replies: 10
    Last Post: 29th January 2006, 20:41

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.