Results 1 to 3 of 3

Thread: QTableWidget Headers don't hangle accentuated characters

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default QTableWidget Headers don't hangle accentuated characters

    The following will generate a header containing "Ä©" instead of "é"

    Qt Code:
    1. item->setText("é");
    2. ui->tableWidget->setHorizontalHeaderItem( i++, item);
    To copy to clipboard, switch view to plain text mode 
    What am i doing wrong ?

  2. #2
    Join Date
    Jul 2008
    Posts
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTableWidget Headers don't hangle accentuated characters

    Anyone ?
    QTableWidget really don't support UTF8/Unicode ?

  3. #3
    Join Date
    May 2010
    Posts
    24
    Thanked 8 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTableWidget Headers don't hangle accentuated characters

    You have to set utf8 as the default for decoding literal strings to QString with
    Qt Code:
    1. QTextCodec::setCodecForCStrings(QTextCodec::codecForName("utf8"));
    To copy to clipboard, switch view to plain text mode 
    preferably before you create any widget.

Similar Threads

  1. Resizing headers view in the QTableWidget
    By jano_alex_es in forum Qt Programming
    Replies: 1
    Last Post: 27th January 2010, 10:55
  2. QTableWidget headers
    By vieraci in forum Qt Programming
    Replies: 2
    Last Post: 18th July 2009, 08:25
  3. trying to union two headers of QTableWidget
    By uygar in forum Qt Programming
    Replies: 2
    Last Post: 25th September 2007, 15:55
  4. How to make headers fixed sized? (QTableWidget)
    By macias in forum Qt Programming
    Replies: 4
    Last Post: 13th August 2007, 15:57
  5. Replies: 3
    Last Post: 29th August 2006, 15:07

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.