QListView

Section: Misc. Reference Manual Pages (3qt)
Updated: 2 February 2007
Index Return to Main Contents
 

NAME

QListView - Implements a list/tree view  

SYNOPSIS

#include <qlistview.h>

Inherits QScrollView.

 

Public Members


QListView ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )

~QListView ()

int treeStepSize () const

virtual void setTreeStepSize ( int )

virtual void insertItem ( QListViewItem * i )

virtual void takeItem ( QListViewItem * i )

virtual void removeItem ( QListViewItem * item ) (obsolete)

QHeader * header () const

virtual int addColumn ( const QString & label, int width = -1 )

virtual int addColumn ( const QIconSet & iconset, const QString & label, int width = -1 )

virtual void removeColumn ( int index )

virtual void setColumnText ( int column, const QString & label )

virtual void setColumnText ( int column, const QIconSet & iconset, const QString & label )

QString columnText ( int c ) const

virtual void setColumnWidth ( int column, int w )

int columnWidth ( int c ) const

enum WidthMode { Manual, Maximum }

virtual void setColumnWidthMode ( int c, WidthMode mode )

WidthMode columnWidthMode ( int c ) const

int columns () const

virtual void setColumnAlignment ( int column, int align )

int columnAlignment ( int column ) const

QListViewItem * itemAt ( const QPoint & viewPos ) const

QRect itemRect ( const QListViewItem * i ) const

int itemPos ( const QListViewItem * item )

void ensureItemVisible ( const QListViewItem * i )

void repaintItem ( const QListViewItem * item ) const

virtual void setMultiSelection ( bool enable ) (obsolete)

bool isMultiSelection () const (obsolete)

enum SelectionMode { Single, Multi, Extended, NoSelection }

void setSelectionMode ( SelectionMode mode )

SelectionMode selectionMode () const

virtual void clearSelection ()

virtual void setSelected ( QListViewItem * item, bool selected )

void setSelectionAnchor ( QListViewItem * item )

bool isSelected ( const QListViewItem * i ) const

QListViewItem * selectedItem () const

virtual void setOpen ( QListViewItem * item, bool open )

bool isOpen ( const QListViewItem * item ) const

virtual void setCurrentItem ( QListViewItem * i )

QListViewItem * currentItem () const

QListViewItem * firstChild () const

QListViewItem * lastItem () const

int childCount () const

virtual void setAllColumnsShowFocus ( bool )

bool allColumnsShowFocus () const

virtual void setItemMargin ( int )

int itemMargin () const

virtual void setRootIsDecorated ( bool )

bool rootIsDecorated () const

virtual void setSorting ( int column, bool ascending = TRUE )

int sortColumn () const

void setSortColumn ( int column )

SortOrder sortOrder () const

void setSortOrder ( SortOrder order )

virtual void sort ()

virtual bool eventFilter ( QObject * o, QEvent * e )

virtual void setShowSortIndicator ( bool show )

bool showSortIndicator () const

virtual void setShowToolTips ( bool b )

bool showToolTips () const

enum ResizeMode { NoColumn, AllColumns, LastColumn }

virtual void setResizeMode ( ResizeMode m )

ResizeMode resizeMode () const

QListViewItem * findItem ( const QString & text, int column, ComparisonFlags compare = ExactMatch | CaseSensitive ) const

enum RenameAction { Accept, Reject }

virtual void setDefaultRenameAction ( RenameAction a )

RenameAction defaultRenameAction () const

bool isRenaming () const

void hideColumn ( int column )
 

Public Slots


virtual void clear ()

virtual void invertSelection ()

virtual void selectAll ( bool select )

void triggerUpdate ()

void adjustColumn ( int col )
 

Signals


void selectionChanged ()

void selectionChanged ( QListViewItem * )

void currentChanged ( QListViewItem * )

void clicked ( QListViewItem * item )

void clicked ( QListViewItem * item, const QPoint & pnt, int c )

void pressed ( QListViewItem * item )

void pressed ( QListViewItem * item, const QPoint & pnt, int c )

void doubleClicked ( QListViewItem * item ) (obsolete)

void doubleClicked ( QListViewItem *, const QPoint &, int )

void returnPressed ( QListViewItem * )

void spacePressed ( QListViewItem * )

void rightButtonClicked ( QListViewItem *, const QPoint &, int )

void rightButtonPressed ( QListViewItem *, const QPoint &, int )

void mouseButtonPressed ( int button, QListViewItem * item, const QPoint & pos, int c )

void mouseButtonClicked ( int button, QListViewItem * item, const QPoint & pos, int c )

void contextMenuRequested ( QListViewItem * item, const QPoint & pos, int col )

void onItem ( QListViewItem * i )

void onViewport ()

void expanded ( QListViewItem * item )

void collapsed ( QListViewItem * item )

void dropped ( QDropEvent * e )

void itemRenamed ( QListViewItem * item, int col, const QString & text )

void itemRenamed ( QListViewItem * item, int col )
 

Properties


bool allColumnsShowFocus - whether items should show keyboard focus using all columns

int childCount - the number of parentless (top-level) QListViewItem objects in this QListView (read only)

int columns - the number of columns in this list view (read only)

RenameAction defaultRenameAction - what action to perform when the editor loses focus during renaming

int itemMargin - the advisory item margin that list items may use

bool multiSelection - whether the list view is in multi-selection or extended-selection mode (obsolete)

ResizeMode resizeMode - whether all, none or the only the last column should be resized

bool rootIsDecorated - whether the list view shows open/close signs on root items

SelectionMode selectionMode - the list view's selection mode

bool showSortIn