Results 1 to 2 of 2

Thread: how to get QTableWidgets horizontal header?

  1. #1
    Join Date
    Oct 2011
    Posts
    160
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default how to get QTableWidgets horizontal header?

    Hi is there any way to get the QTableWidget's horizontal header directly?


    currently i'm doing as below....
    Qt Code:
    1. for(int i=0;i<temp->columnCount();i++)
    2. {
    3. rowPtr=temp->horizontalHeaderItem(i);
    4. QString str=rowPtr->text();
    5. std::cout<<"the item is:"<<str.toStdString()<<endl;
    6. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by aurora; 14th December 2011 at 06:09.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: how to get QTableWidgets horizontal header?


Similar Threads

  1. [SOLVED] QTableWidget subclass and horizontal header
    By nephre in forum Qt Programming
    Replies: 0
    Last Post: 5th November 2010, 22:41
  2. QTableView Horizontal Header's Width
    By araglin in forum Newbie
    Replies: 3
    Last Post: 21st December 2008, 08:54
  3. How to customize horizontal header (diagonal header view)
    By vairamuthu.g in forum Qt Programming
    Replies: 4
    Last Post: 4th September 2008, 15:59
  4. horizontal header over two rows in tablewidget
    By Nippler in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2008, 10:33
  5. QTable Horizontal Header Off
    By Solarity in forum Newbie
    Replies: 1
    Last Post: 17th March 2006, 20:32

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.