Results 1 to 2 of 2

Thread: Problem about QTableView.

  1. #1
    Join Date
    Feb 2007
    Posts
    71
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Question Problem about QTableView.

    modelHistoryLog->setTable("testtable");
    modelHistoryLog->setHeaderData(0,Qt::Horizontal,codec->toUnicode("C1"));
    modelHistoryLog->setHeaderData(1,Qt::Horizontal,codec->toUnicode("C2"));
    modelHistoryLog->setHeaderData(2,Qt::Horizontal,codec->toUnicode("C3"));

    column will display: C1 C2 C3


    but

    I want: C3 C1 C2

    how to?

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

    Default Re: Problem about QTableView.

    Qt Code:
    1. modelHistoryLog->setHeaderData(0,Qt::Horizontal,codec->toUnicode("C3"));
    2. modelHistoryLog->setHeaderData(1,Qt::Horizontal,codec->toUnicode("C1"));
    3. modelHistoryLog->setHeaderData(2,Qt::Horizontal,codec->toUnicode("C2"));
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. QTableView selection problem
    By aiprober in forum Qt Programming
    Replies: 12
    Last Post: 9th June 2008, 11:55
  2. QTableView Performance Problem on Windows
    By umitoz in forum Qt Programming
    Replies: 1
    Last Post: 31st August 2007, 16:47
  3. QTableView multiline problem
    By ramazangirgin in forum Qt Programming
    Replies: 3
    Last Post: 3rd August 2007, 10:02
  4. QTableView refresh problem
    By tebessum in forum Qt Programming
    Replies: 3
    Last Post: 29th December 2006, 11:22
  5. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 13:49

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.