Results 1 to 6 of 6

Thread: charset in QFont?

  1. #1
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up charset in QFont?

    Hi All,

    I want to set charset for my font, is there any property for charset in QFont?

    Thanks,
    Rajesh.S
    Thanks,
    Rajesh.S

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: charset in QFont?

    In general Qt uses Unicode. If you want to change the way it converts all texts to unicode, you should take a look at QTextCodec class.

  3. The following user says thank you to wysota for this useful post:

    rajeshs (28th September 2007)

  4. #3
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: charset in QFont?

    Hi wysota,


    I need to set charset Property to QFont ? How is this possible with QTextCodec class?
    Thanks,
    Rajesh.S

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: charset in QFont?

    charset property? What is that? Please read QTextCodec docs, it's explained there.

  6. #5
    Join Date
    Jun 2007
    Location
    India/Bangalore
    Posts
    156
    Thanks
    26
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: charset in QFont?

    Qt 3 have QFont::Script property ? In Qt 4 how we can set this property to font?



    QFont::Script ,I mentioned charset property
    Thanks,
    Rajesh.S

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: charset in QFont?

    I don't think there is such a property (or a similar one) in Qt4. In Qt3 you can't set the script to the font either. What do you want to achieve? If you want to convert between input encoding and the one displayed by Qt, you really have to set a text codec or encode all strings in UTF-8 (I think)...

Similar Threads

  1. QFont
    By ghorwin in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2007, 21:44
  2. Default value for QFont
    By Kapil in forum Qt Programming
    Replies: 1
    Last Post: 2nd June 2006, 06:40

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.