[Qt-interest] 'Report View' style QTableWidget

Sean Harmer sean.harmer at maps-technology.com
Fri May 29 15:20:52 CEST 2009


On Friday 29 May 2009 14:08:59 Robert Caldecott wrote:
> I want to display a list of items in a similar way to the report view
> found in the Windows list control.  I thought using a QTableWidget
> would be a good start, and it looks good except I don't know how to:
>
> 1.  Enable 'full row select' so when the user clicks on an item with
> the mouse the entire row is selected.
myTableView->setSelectionBehaviour( QAbstractItemView::SelectRows );

(it's a member of QAbstractItemView).

> 2.  How do I get rid of the vertical header column (which by default
> shows the row numbers).
myTableView->verticalHeader()->hide();

HTH,

Sean




More information about the Qt-interest-old mailing list