Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, May 2007
Remove Headers from QTableView


Message 1 in thread

Is there a built in method to NOT display and type of headers in a 
QTableView? I have looked every where and I am coming up short.

Thanks
Mike Jackson

--
 [ signature omitted ] 

Message 2 in thread

Mike Jackson wrote:
> Is there a built in method to NOT display and type of headers in a 
> QTableView? I have looked every where and I am coming up short.
>
> Thanks
> Mike Jackson
>

table->horizontalHeader()->hide();
table->verticalHeader()->hide();

The headers are a source of a lot of extra functionality such as 
column/row hiding. Remember to always look at the API to QHeaderView 
along with QTableView.

--Justin
begin:vcard
begin:vcard
fn:Justin Noel
n:Noel;Justin
org:ICS;Engineering
adr:;;54B Middlesex Trpk;Bedford;MA;01730;USA
email;internet:justin@xxxxxxx
title:Sr. Consulting Engineer / Certified Qt Instructor
tel;work:(617) 621-0060
url:http://www.ics.com
version:2.1
end:vcard


Message 3 in thread

On 2007-05-22 12:13:31 -0400, Justin Noel <justin@xxxxxxx> said:

> 
> Mike Jackson wrote:
>> Is there a built in method to NOT display and type of headers in a
>> QTableView? I have looked every where and I am coming up short.
>> 
>> Thanks
>> Mike Jackson
>> 
> 
> table->horizontalHeader()->hide();
> table->verticalHeader()->hide();
> 
> The headers are a source of a lot of extra functionality such as
> column/row hiding. Remember to always look at the API to QHeaderView
> along with QTableView.
> 
> --Justin
> 
> 
> This message has one or more attachments. Select "Save Attachments" 
> from the File menu to save.
> begin:vcard
> fn:Justin Noel

Figured it would be simple. I am new to Qt and so I haven't yet gotten 
into the mindset of Qt. This little nugget of info will go a long way,.

Thanks
Mike  

--
 [ signature omitted ] 

Message 4 in thread

from http://doc.trolltech.com/4.2/qtableview.html :

The table has a vertical header that can be obtained using the
verticalHeader() function, and a horizontal header that is available
through the horizontalHeader() function. The height of each row in the
table can be found by using rowHeight(); similarly, the width of columns
can be found using columnWidth(). They are both just QWidgets so you can
hide either of them using their hide() functions.

Cheers,
Peter

> -----Original Message-----
> From: Mike Jackson [mailto:imikejackson@xxxxxxxxx]
> Sent: Tuesday, May 22, 2007 6:10 PM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: Remove Headers from QTableView
> 
> Is there a built in method to NOT display and type of headers in a
> QTableView? I have looked every where and I am coming up short.
> 
> Thanks
> Mike Jackson

--
 [ signature omitted ]