Results 1 to 7 of 7

Thread: QTableWidget and the setHorizontalHeaderItem/setVerticalHeaderItem functions

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QTableWidget and the setHorizontalHeaderItem/setVerticalHeaderItem functions

    Quote Originally Posted by ouekah View Post
    And dimension points to the same value as rows and columns in SquareMatrix...
    I thought so because of the name. But you never know here... So only thing I can guess of (without proving it) is, that you cant reuse one item for vertical and horizontal header. So try:
    Qt Code:
    1. matrixTable->setHorizontalHeaderItem(row, new QTableWidgetItem(names.at(row)));
    2. matrixTable->setVerticalHeaderItem(row, new QTableWidgetItem(names.at(row)));
    To copy to clipboard, switch view to plain text mode 

    If that is also not helping, debug and backtrace to see where it exactly crashes.

  2. The following user says thank you to Lykurg for this useful post:

    ouekah (30th March 2010)

Similar Threads

  1. C++ Static Functions
    By weaver4 in forum Newbie
    Replies: 7
    Last Post: 17th November 2009, 10:42
  2. Regards CallBack Functions
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2009, 16:16
  3. using functions in different forms
    By vishnu5 in forum General Programming
    Replies: 1
    Last Post: 4th February 2008, 19:37
  4. Using a frame for different functions
    By anafor2004 in forum Newbie
    Replies: 1
    Last Post: 29th January 2008, 13:45
  5. Mathematical Functions
    By krishbhala in forum Qt Programming
    Replies: 3
    Last Post: 11th January 2008, 13:55

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.