Results 1 to 3 of 3

Thread: Displaying extended ASII characters

  1. #1
    Join Date
    Jun 2007
    Posts
    62
    Thanks
    28
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Displaying extended ASII characters

    Yes, yet another in a continuing series of newbie questions.

    I've got a simple application that allows the user to input a key string and a source string. When they push the XOR button, the app does a simple XOR encryption and displays the result in an output QLineEdit.

    Naturally the resulting string is full of characters in the range of 0-31 and 128-255.

    Now, I notice that when I have such strings in, say, Microsoft Access, the non-printable characters will print. They appear to be in the Windows extended character set, with lots of angle-bars (e.g., U+2514), astronomical symbols (e.g.,U+263C), and whatnot from the Arial character set.

    They do not print in my QLineEdit, though they can be copied and pasted.

    I don't suppose there is any way to get those characters to print?

  2. #2
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Displaying extended ASII characters

    QLineEdit should be able to display unicode. So I suppose you could substitute some unicode characters for those ascii characters that would otherwise be invisible. By code.

    But if you still want to be able to copy/paste them properly, you might have to extend QLineEdit and reimplement the function that paints the widget. Make it paint other characters than it actually contains. I'm not sure at the moment which function that would be. Take a look in the docs. It will be a virtual one with protected visibility.
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

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

    WinchellChung (19th July 2007)

  4. #3
    Join Date
    Jun 2007
    Posts
    62
    Thanks
    28
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Displaying extended ASII characters

    Thanks Michiel!

Similar Threads

  1. Problem at time compilation in traslation of language
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2007, 14:18

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.