QAdvanced Item View  0.4
The QAIV (Qt Advanced Item Views) library provides GUI and utility classes extending the capabilities of the Qt item views.
 All Classes Functions Variables Enumerations Enumerator Properties Groups Pages
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
QAdvancedTableView Class Reference

The QAdvancedTableView class provides an advanced model/view implementation of a table view. More...

#include <qadvancedtableview.h>

Inheritance diagram for QAdvancedTableView:

Public Slots

void addFilterGroup ()
 
void clearSelection ()
 
void edit (const QModelIndex &index)
 
void hideColumn (int column)
 
void hideColumns (const QStringList &names)
 
void hideFilterView ()
 
void hideRow (int row)
 
void resizeColumnToContents (int column)
 
void resizeColumnsToContents ()
 
void resizeRowToContents (int row)
 
void resizeRowsToContents ()
 
virtual void reset ()
 
void scrollToBottom ()
 
void scrollToTop ()
 
virtual void selectAll ()
 
void selectColumn (int colum)
 
void selectRow (int row)
 
void setCurrentIndex (const QModelIndex &index)
 
void setFilterEnabled (int row, int column, bool enable)
 
void setShowFilter (bool show)
 
void setShowFixedRows (bool show)
 
void setShowGrid (bool show)
 
void showColumn (int column)
 
void showRow (int row)
 
void splitView (bool split)
 
void update (const QModelIndex &index)
 

Signals

void activated (const QModelIndex &index)
 
void clicked (const QModelIndex &index)
 
void doubleClicked (const QModelIndex &index)
 
void entered (const QModelIndex &index)
 
void pressed (const QModelIndex &index)
 
void viewportEntered ()
 

Public Member Functions

 QAdvancedTableView (QWidget *parent=0)
 
 ~QAdvancedTableView ()
 
bool alternatingRowColors () const
 
int columnAt (int x) const
 
QVariantList columnsFilterTypes (int column) const
 
int columnWidth (int column) const
 
QMenu * createStandardContextMenu (const QModelIndex &index)
 
QModelIndex currentIndex () const
 
int defaultFilterType (int column) const
 
bool dragEnabled () const
 
QAbstractItemView::EditTriggers editTriggers () const
 
QAbstractFilterfilterAt (int row, int column) const
 
QIcon filterDisabledIcon () const
 
QIcon filterEnabledIcon () const
 
QAbstractFilterModelfilterModel () const
 
QAbstractFilterProxyModelfilterProxyModel () const
 
QModelIndexList fixedRows (int column=0) const
 
bool hasAutoScroll () const
 
QHeaderView * horizontalHeader () const
 
Qt::PenStyle gridStyle () const
 
QSize iconSize () const
 
virtual QModelIndex indexAt (const QPoint &point) const
 
bool isColumnHidden (int column) const
 
bool showFixedRows () const
 
bool isRowHidden (int row) const
 
bool isSortIndicatorShown () const
 
bool isSortingEnabled () const
 
QAbstractItemDelegate * itemDelegate () const
 
QAbstractItemDelegate * itemDelegateForColumn (int column) const
 
QAbstractItemDelegate * itemDelegateForRow (int row) const
 
QSize minimumSizeHint () const
 
QAbstractItemModel * model () const
 
bool restoreFilter (const QByteArray &data)
 
bool restoreState (const QByteArray &data)
 
QModelIndex rootIndex () const
 
int rowAt (int y) const
 
int rowHeight (int row) const
 
QByteArray saveFilter () const
 
QByteArray saveState ()
 
QAbstractItemView::SelectionBehavior selectionBehavior () const
 
QAbstractItemView::SelectionMode selectionMode () const
 
QItemSelectionModel * selectionModel () const
 
void setAlternatingRowColors (bool enable)
 
void setAutoScroll (bool enable)
 
void setColumnWidth (int column, int width)
 
void setContextMenuPolicy (Qt::ContextMenuPolicy policy)
 
void setDefaultFilterType (int column, int type)
 
void setDefaultFilterType (const QString &name, int type)
 
void setDragEnabled (bool enable)
 
void setEditTriggers (QAbstractItemView::EditTriggers triggers)
 
void setColumnFilterTypes (int column, const QVariantList &types)
 
void setFilterDisabledIcon (const QIcon &icon)
 
void setFilterEnabledIcon (const QIcon &icon)
 
void setFilterModel (QAbstractFilterModel *model)
 
void setFilterProxyModel (QAbstractFilterProxyModel *proxy)
 
bool setFilterType (int type, int column, int row=0)
 
void setGridStyle (Qt::PenStyle style)
 
void setIconSize (const QSize &size)
 
void setItemDelegate (QAbstractItemDelegate *delegate)
 
void setItemDelegateForColumn (int column, QAbstractItemDelegate *delegate)
 
void setItemDelegateForRow (int row, QAbstractItemDelegate *delegate)
 
void setModel (QAbstractItemModel *model)
 
virtual void setRootIndex (const QModelIndex &index)
 
void setRowHeight (int row, int height)
 
void setSelectionMode (QAbstractItemView::SelectionMode mode)
 
void setSortIndicatorShown (bool show)
 
void setSortingEnabled (bool enable)
 
void setTextElideMode (Qt::TextElideMode mode)
 
void setWordWrap (bool wrap)
 
bool showFilter () const
 
bool showGrid () const
 
QSize sizeHint () const
 
void sortByColumn (int column, Qt::SortOrder order)
 
Qt::TextElideMode textElideMode () const
 
QHeaderView * verticalHeader () const
 
bool viewSplitted () const
 
QWidget * viewport () const
 
bool wordWrap () const
 

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *event)
 
bool eventFilter (QObject *obj, QEvent *event)
 
void showEvent (QShowEvent *event)
 

Properties

bool alternatingRowColors
 
bool autoScroll
 
bool dragEnabled
 
QAbstractItemView::EditTriggers editTriggers
 
QIcon filterDisabledIcon
 
QIcon filterEnabledIcon
 
Qt::PenStyle gridStyle
 
QSize iconSize
 
QAbstractItemView::SelectionBehavior selectionBehavior
 
QAbstractItemView::SelectionMode selectionMode
 
bool showFilter
 
bool showFixedRows
 
bool showGrid
 
bool showSortIndicator
 
bool splitView
 
bool sortingEnabled
 
Qt::TextElideMode textElideMode
 
bool wordWrap
 

Detailed Description

The QAdvancedTableView class provides an advanced model/view implementation of a table view.

QAdvancedTableView is not deribed from QAbstractItemView, but the current implementation provides maximum compatibility with QAbstractItemView.

Features

QAdvancedTableView provides the following features.

Visual Appearance

QTable View Compatibility

With all features disabled, the QAbvancedTableView provides with same look and feel as Qt's QTableView class.

qadvancedtableview01.png
Compatibility Mode

Filter

The visibility of the filter is controlled with setShowFilter().

qadvancedtableview02.png
Filter View Visible

Fixed Rows

qadvancedtableview03.png
Fixed Rows Enabled

A list

Splitted View

qadvancedtableview04.png
Splitted View Enabled

Filter

Constructor & Destructor Documentation

QAdvancedTableView::QAdvancedTableView ( QWidget *  parent = 0)
explicit

Constructs a filter table view with a parent to represent the data.

QAdvancedTableView::~QAdvancedTableView ( )

Destroys the filter table view.

Member Function Documentation

void QAdvancedTableView::activated ( const QModelIndex &  index)
signal

This signal is emitted when the item specified by index is activated by the user. How to activate items depends on the platform; e.g., by single- or double-clicking the item, or by pressing the Return or Enter key when the item is current.

See also
clicked() doubleClicked() entered() pressed()
void QAdvancedTableView::addFilterGroup ( )
slot

Adds the an empty filter group.

bool QAdvancedTableView::alternatingRowColors ( ) const

Returns true if alternating row colors are displayed. Otherwise false.

See also
setAlternatingRowColors()
void QAdvancedTableView::clearSelection ( )
slot

Deselects all selected items. The current index will not be changed.

See also
setSelection(), selectAll()
void QAdvancedTableView::clicked ( const QModelIndex &  index)
signal

This signal is emitted when a mouse button is clicked. The item the mouse was clicked on is specified by index. The signal is only emitted when the index is valid.

See also
activated() doubleClicked() entered() pressed()
int QAdvancedTableView::columnAt ( int  x) const

Returns the column in which the given x-coordinate, x, in contents coordinates is located.

Note
This function returns -1 if the given coordinate is not valid (has no column).
See also
rowAt()
QVariantList QAdvancedTableView::columnsFilterTypes ( int  column) const

Returns a list filter types allowed for the specfied column. The list is empty if the specified column does not exists or all types are allowed.

See also
setColumnFilterTypes()
int QAdvancedTableView::columnWidth ( int  column) const

Returns the width of the given column.

See also
setColumnWidth()
void QAdvancedTableView::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

QWidget::contextMenuEvent().

QModelIndex QAdvancedTableView::currentIndex ( ) const

Returns the model index of the current item.

See also
setCurrentIndex()
int QAdvancedTableView::defaultFilterType ( int  column) const

Returns the default filter type set for the given column. Returns -1 if no default filter type is set or the given column does not exists.

See also
setDefaultFilterType()
void QAdvancedTableView::doubleClicked ( const QModelIndex &  index)
signal

This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by index. The signal is only emitted when the index is valid.

bool QAdvancedTableView::dragEnabled ( ) const

Returns true if drag is enabled. Otherwise false.

void QAdvancedTableView::edit ( const QModelIndex &  index)
slot

Starts editing the item corresponding to the given qp index if it is editable.

QAbstractItemView::EditTriggers QAdvancedTableView::editTriggers ( ) const

Returns the current edit trigger settings.

See also
QAbstractItemView::editTriggers()
void QAdvancedTableView::entered ( const QModelIndex &  index)
signal

This signal is emitted when the mouse cursor enters the item specified by index. Mouse tracking needs to be enabled for this feature to work.

See also
clicked() doubleClicked()
bool QAdvancedTableView::eventFilter ( QObject *  obj,
QEvent *  event 
)
protected

QWidget::contextMenuEvent().

QAbstractFilter * QAdvancedTableView::filterAt ( int  row,
int  column 
) const

Returns the filter at the specified row and column, or 0 if no filter exists at row and column.

QAbstractFilterModel * QAdvancedTableView::filterModel ( ) const

Returns the filter model that this view is using for filtering.

QAbstractFilterProxyModel * QAdvancedTableView::filterProxyModel ( ) const

Retunr the filter proxy model that this view is using.

QModelIndexList QAdvancedTableView::fixedRows ( int  column = 0) const

Returns the indexes in the given column for the rows where all columns are fixed.

Qt::PenStyle QAdvancedTableView::gridStyle ( ) const

Returns the style used when drawing the grid.

See also
setGridStyle()
bool QAdvancedTableView::hasAutoScroll ( ) const

Returns true if autoscrolling in drag move events is enabled.

See also
setAutoScroll()
void QAdvancedTableView::hideColumn ( int  column)
slot

Hide the given column.

See also
showColumn(), hideRow()
void QAdvancedTableView::hideColumns ( const QStringList &  names)
slot

Hide the columns specified by the list of column names.

void QAdvancedTableView::hideFilterView ( )
slot

Hides the filter view.

void QAdvancedTableView::hideRow ( int  row)
slot

Hide the given row.

See also
showRow(), hideColumn()
QHeaderView * QAdvancedTableView::horizontalHeader ( ) const

Returns the table view's horizontal header.

QModelIndex QAdvancedTableView::indexAt ( const QPoint &  point) const
virtual

Returns the model index of the item at the viewport coordinates point.

bool QAdvancedTableView::isColumnHidden ( int  column) const

Returns true if the given column is hidden; otherwise returns false.

See also
isRowHidden()
bool QAdvancedTableView::isRowHidden ( int  row) const

Returns true if the given row is hidden; otherwise returns false.

See also
isColumnHidden()
bool QAdvancedTableView::isSortIndicatorShown ( ) const

Returns true if the sort indicator is shown. Otherwise false.

bool QAdvancedTableView::isSortingEnabled ( ) const

Returns true if sorting is enabled. Otherwise false.

See also
setSortingEnabled()
QAbstractItemDelegate * QAdvancedTableView::itemDelegate ( ) const

Returns the item delegate used by this view and model. This is either one set with setItemDelegate(), or the default one.

See also
setItemDelegate()
QAbstractItemDelegate * QAdvancedTableView::itemDelegateForColumn ( int  column) const

Returns the item delegate used by this view and model for the given column. You can call itemDelegate() to get a pointer to the current delegate for a given index.

See also
setItemDelegateForColumn() setItemDelegateForRow() itemDelegate()
QAbstractItemDelegate * QAdvancedTableView::itemDelegateForRow ( int  row) const

Returns the item delegate used by this view and model for the given row, or 0 if no delegate has been assigned. You can call itemDelegate() to get a pointer to the current delegate for a given index.

See also
setItemDelegateForRow() setItemDelegateForColumn() itemDelegate()
QSize QAdvancedTableView::minimumSizeHint ( ) const

QWidget::minimumSizeHint()

QAbstractItemModel * QAdvancedTableView::model ( ) const

Returns the model used by this view.

void QAdvancedTableView::pressed ( const QModelIndex &  index)
signal

This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by index. The signal is only emitted when the index is valid. Use the QApplication::mouseButtons() function to get the state of the mouse buttons.

See also
activated() clicked() doubleClicked() entered()
void QAdvancedTableView::reset ( )
virtualslot

Reset the internal state of the view.

void QAdvancedTableView::resizeColumnsToContents ( )
slot

Resizes all columns based on the size hints of the delegate used to render each item in the columns.

void QAdvancedTableView::resizeColumnToContents ( int  column)
slot

Resizes the given column based on the size hints of the delegate used to render each item in the column.

Remarks
Only visible columns will be resized. Reimplement sizeHintForColumn() to resize hidden columns as well.
void QAdvancedTableView::resizeRowsToContents ( )
slot

Resizes all rows based on the size hints of the delegate used to render each item in the rows.

void QAdvancedTableView::resizeRowToContents ( int  row)
slot

Resizes the given row based on the size hints of the delegate used to render each item in the row.

bool QAdvancedTableView::restoreFilter ( const QByteArray &  data)

Restores the filter definition of this table view. This function returns true if the filter definition was restored; otherwise returns false.

See also
saveState()
bool QAdvancedTableView::restoreState ( const QByteArray &  data)

Restores the state of this advanced table view. This function returns true if the state was restored; otherwise returns false.

QModelIndex QAdvancedTableView::rootIndex ( ) const

Returns the model index of the model's root item. The root item is the parent item to the view's toplevel items. The root can be invalid.

int QAdvancedTableView::rowAt ( int  y) const

Returns the row in which the given y-coordinate, y, in contents coordinates is located.

Note
This function returns -1 if the given coordinate is not valid (has no row).
int QAdvancedTableView::rowHeight ( int  row) const

Returns the height of the given row.

QByteArray QAdvancedTableView::saveFilter ( ) const

Saves the current filter definition of this table view.

See also
restoreFilter()
QByteArray QAdvancedTableView::saveState ( )

Saves the current state of this advanced table view.

See also
restoreState()
void QAdvancedTableView::scrollToBottom ( )
slot

Scrolls the view to the bottom.

See also
scrollToTop()
void QAdvancedTableView::scrollToTop ( )
slot

Scrolls the view to the top.

See also
scrollToTop()
void QAdvancedTableView::selectAll ( )
virtualslot

Selects all items in the view. This function will use the selection behavior set on the view when selecting.

void QAdvancedTableView::selectColumn ( int  colum)
slot

Selects the given column in the table view if the current SelectionMode and SelectionBehavior allows columns to be selected.

See also
selectRow()
QAbstractItemView::SelectionMode QAdvancedTableView::selectionMode ( ) const

Returns the current selection mode

See also
setSelectionMode()
QItemSelectionModel * QAdvancedTableView::selectionModel ( ) const

Returns the current selection model.

void QAdvancedTableView::selectRow ( int  row)
slot

Selects the given row in the table view if the current SelectionMode and SelectionBehavior allows rows to be selected.

See also
selectColumn()
void QAdvancedTableView::setAlternatingRowColors ( bool  enable)

If enable is true, the item background will be drawn using QPalette::Base and QPalette::AlternateBase; otherwise the background will be drawn using the QPalette::Base color.

See also
alternatingRowColors()
void QAdvancedTableView::setAutoScroll ( bool  enable)

If enable is true auto scroll is enabled.

void QAdvancedTableView::setColumnFilterTypes ( int  column,
const QVariantList &  types 
)

Sets the list of available filter types for the given column.

See also
columnsFilterTypes()
void QAdvancedTableView::setColumnWidth ( int  column,
int  width 
)

Sets the width of the given column to be width.

See also
columnWidth()
void QAdvancedTableView::setContextMenuPolicy ( Qt::ContextMenuPolicy  policy)

Sets the custom context menu policy to policy.

void QAdvancedTableView::setCurrentIndex ( const QModelIndex &  index)
slot

Sets the current item to be the item at index.

void QAdvancedTableView::setDefaultFilterType ( int  column,
int  type 
)

Sets the default filter type for the specified column.

void QAdvancedTableView::setDefaultFilterType ( const QString &  name,
int  type 
)

Sets the default filter type for the specified column.

void QAdvancedTableView::setDragEnabled ( bool  enable)

If is true drag is enabled.

void QAdvancedTableView::setEditTriggers ( QAbstractItemView::EditTriggers  triggers)

Sets the current item to be the item at index.

void QAdvancedTableView::setFilterEnabled ( int  row,
int  column,
bool  enable 
)
slot

If is true the filter specified by the given row and column is enabled.

Note
row and column specify a cell in the view's filter view.
bool QAdvancedTableView::setFilterType ( int  type,
int  column,
int  row = 0 
)

Sets the filter type for the specified column.

See also
filterType()
void QAdvancedTableView::setGridStyle ( Qt::PenStyle  style)

This property holds the pen style used to draw the grid.

See also
gridStyle()
void QAdvancedTableView::setItemDelegate ( QAbstractItemDelegate *  delegate)

Sets the item delegate for this view and its model to delegate. This is useful if you want complete control over the editing and display of items.

See also
itemDelegate()
void QAdvancedTableView::setItemDelegateForColumn ( int  column,
QAbstractItemDelegate *  delegate 
)

Sets the given item delegate used by this view and model for the given column. All items on column will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

See also
itemDelegate()
void QAdvancedTableView::setItemDelegateForRow ( int  row,
QAbstractItemDelegate *  delegate 
)

Sets the given item delegate used by this view and model for the given row. All items on row will be drawn and managed by delegate instead of using the default delegate (i.e., itemDelegate()).

See also
itemDelegate()
void QAdvancedTableView::setModel ( QAbstractItemModel *  model)

Sets the model for the view to present.

void QAdvancedTableView::setRootIndex ( const QModelIndex &  index)
virtual

Sets the model's root index.

void QAdvancedTableView::setRowHeight ( int  row,
int  height 
)

Sets the height of the given row to be height.

See also
rowHeight()
void QAdvancedTableView::setSelectionMode ( QAbstractItemView::SelectionMode  mode)

Sets the selection mode.

void QAdvancedTableView::setShowFilter ( bool  show)
slot

If visible is true the filter is shown. Otherwise the filter is hidden.

See also
showFilter()
void QAdvancedTableView::setShowFixedRows ( bool  show)
slot

Enables the fixed rows mode if on is true.

See also
showFixedRows()
void QAdvancedTableView::setShowGrid ( bool  show)
slot

If show is true a grid is drawn for the table. Otherwise no grid is drawn.

See also
showGrid()
void QAdvancedTableView::setSortIndicatorShown ( bool  show)

If show is true a sort indicator is shown.

void QAdvancedTableView::setSortingEnabled ( bool  enable)

If enable is true sorting i::s enabled. Otherwise sorting is disabled.

See also
isSortingEnabled()
void QAdvancedTableView::setTextElideMode ( Qt::TextElideMode  mode)

Set the text elide mode to mode.

See also
textElideMode()
void QAdvancedTableView::setWordWrap ( bool  wrap)

If wrap is true word wrapping is enabled.

void QAdvancedTableView::showColumn ( int  column)
slot

Show the given column.

See also
hideColumn() showRow()
void QAdvancedTableView::showEvent ( QShowEvent *  event)
protected

QWidget::contextMenuEvent().

bool QAdvancedTableView::showFilter ( ) const

Returns true if the filter are shown. Otherwise false.

See also
setShowFilter()
bool QAdvancedTableView::showFixedRows ( ) const

Returns true if the fixed rows are show. Otherwise false.

See also
setShowFixedRows()
bool QAdvancedTableView::showGrid ( ) const

Returns true if the show is shwon. Otherwise false.

See also
setShowFilter()
void QAdvancedTableView::showRow ( int  row)
slot

Show the given row.

See also
hideRow() showColumn()
QSize QAdvancedTableView::sizeHint ( ) const

Returns true if the filter are shown. Otherwise false.

See also
setShowFilter()
void QAdvancedTableView::sortByColumn ( int  column,
Qt::SortOrder  order 
)

Sorts the model by the values in the given column in the given order.

See also
sortingEnabled
void QAdvancedTableView::splitView ( bool  split)
slot

Splits view if split is true.

See also
viewSplitted()
Qt::TextElideMode QAdvancedTableView::textElideMode ( ) const

Return the vies's text elide mode.

See also
setTextElideMode()
void QAdvancedTableView::update ( const QModelIndex &  index)
slot

Updates the area occupied by the given index.

QHeaderView * QAdvancedTableView::verticalHeader ( ) const

Returns the table view's vertical header.

QWidget * QAdvancedTableView::viewport ( ) const

Returns the viewport widget.

void QAdvancedTableView::viewportEntered ( )
signal

This function is used to handle tool tips, and What's This? mode, if the given event is a QEvent::ToolTip,or a QEvent::WhatsThis. It passes all other events on to its base class viewportEvent() handler.

bool QAdvancedTableView::viewSplitted ( ) const

Returns true if the view is splitted. Otherwise false.

See also
splitView()
bool QAdvancedTableView::wordWrap ( ) const

Returns true if word wrap is enabled. Otherwise false.

Property Documentation

bool QAdvancedTableView::alternatingRowColors
readwrite

This property holds whether to draw the background using alternating colors.

By default this property is false.

See also
alternatingRowColors(), setAlternatingRowColors()
bool QAdvancedTableView::autoScroll
readwrite

This property holds whether autoscrolling in drag move events is enabled.

If this property is set to true (the default), the QAbstractItemView automatically scrolls the contents of the view if the user drags within 16 pixels of the viewport edge. If the current item changes, then the view will scroll automatically to ensure that the current item is fully visible.

This property only works if the viewport accepts drops. Autoscroll is switched off by setting this property to false.

See also
bool hasAutoScroll() const
void setAutoScroll(bool enable)
bool QAdvancedTableView::dragEnabled
readwrite

This property holds whether the view supports dragging of its own items.

QAbstractItemView::EditTriggers QAdvancedTableView::editTriggers
readwrite

This property holds which actions will initiate item editing.

This property is a selection of flags defined by EditTrigger, combined using the OR operator. The view will only initiate the editing of an item if the action performed is set in this property.

QIcon QAdvancedTableView::filterDisabledIcon
readwrite

This property holds the icon shown if a filter is disabled.

QIcon QAdvancedTableView::filterEnabledIcon
readwrite

This property holds the icon shown if a filter is enabled.

Qt::PenStyle QAdvancedTableView::gridStyle
readwrite

This property holds the pen style used to draw the grid.

QSize QAdvancedTableView::iconSize
readwrite

This property holds the size of items' icons.

Setting this property when the view is visible will cause the items to be laid out again.

QAbstractItemView::SelectionBehavior QAdvancedTableView::selectionBehavior
readwrite

This property holds which selection behavior the view uses. This property holds whether selections are done in terms of single items, rows or columns.

See also
QTableView::selectionBehavior()
QAbstractItemView::SelectionMode QAdvancedTableView::selectionMode
readwrite

This property holds which selection mode the view operates in.

bool QAdvancedTableView::showFilter
readwrite

This property holds whether the filter are shown. If this property is true the filter are visible; if the property is false, no filter are shown. The default value is true.

See also
bool showFilter() const
void setShowFilter(bool show)
bool QAdvancedTableView::showFixedRows
readwrite

This property holds whether fixed rows are shown. If this property is true fixed rows are show as a seperate table view above the main view; if the property is false, no fixed rows are shown. The default value is false.

See also
bool showFixedRows() const
void setShowFixedRows(bool show)
bool QAdvancedTableView::showGrid
readwrite

This property holds whether the grid is shown. If this property is true a grid is drawn for the table; if the property is false, no grid is drawn. The default value is true.

See also
bool showGrid() const
void setShowGrid(bool show)
bool QAdvancedTableView::sortingEnabled
readwrite

This property holds whether sorting is enabled.

If this property is true, sorting is enabled for the table. If this property is false, sorting is not enabled. The default value is false.

Note
Setting the property to true with setSortingEnabled() immediately triggers a call to sortByColumn() with the current sort section and order.
See also
isSortingEnabled()
setSortingEnabled()
bool QAdvancedTableView::splitView
readwrite

This property holds whether the view is splitted If this property is true is splitted into two table view; if the property is false, a single view is shown. The default value is false.

See also
bool viewSplitted() const
void splitView(bool split)
Qt::TextElideMode QAdvancedTableView::textElideMode
readwrite

This property holds the position of the "..." in elided text.

The default value for all item views is Qt::ElideRight.

bool QAdvancedTableView::wordWrap
readwrite

This property holds the item text word-wrapping policy.

If this property is true then the item text is wrapped where necessary at word-breaks; otherwise it is not wrapped at all. This property is true by default.

Note that even of wrapping is enabled, the cell will not be expanded to fit all text. Ellipsis will be inserted according to the current textElideMode.


The documentation for this class was generated from the following files: