com.trolltech.qt.gui
Class QListView

java.lang.Object
  extended by com.trolltech.qt.internal.QSignalEmitterInternal
      extended by com.trolltech.qt.QSignalEmitter
          extended by com.trolltech.qt.QtJambiObject
              extended by com.trolltech.qt.core.QObject
                  extended by com.trolltech.qt.gui.QWidget
                      extended by com.trolltech.qt.gui.QFrame
                          extended by com.trolltech.qt.gui.QAbstractScrollArea
                              extended by com.trolltech.qt.gui.QAbstractItemView
                                  extended by com.trolltech.qt.gui.QListView
All Implemented Interfaces:
QPaintDeviceInterface, QtJambiInterface
Direct Known Subclasses:
QListWidget, QUndoView

public class QListView
extends QAbstractItemView

The QListView class provides a list or icon view onto a model. A QListView presents items stored in a model, either as a simple non-hierarchical list, or as a collection of icons. This class is used to provide lists and icon views that were previously provided by the QListBox and QIconView classes, but using the more flexible approach provided by Qt's model/view architecture.

The QListView class is one of the Model/View Classes and is part of Qt's model/view framework.

This view does not display horizontal or vertical headers; to display a list of items with a horizontal header, use QTreeView instead.

QListView implements the interfaces defined by the QAbstractItemView class to allow it to display data provided by models derived from the QAbstractItemModel class.

Items in a list view can be displayed using one of two view modes: In ListMode , the items are displayed in the form of a simple list; in IconMode , the list view takes the form of an icon view in which the items are displayed with icons like files in a file manager. By default, the list view is in ListMode . To change the view mode, use the setViewMode() function, and to determine the current view mode, use viewMode().

Items in these views are laid out in the direction specified by the flow() of the list view. The items may be fixed in place, or allowed to move, depending on the view's movement() state.

If the items in the model cannot be completely laid out in the direction of flow, they can be wrapped at the boundary of the view widget; this depends on isWrapping(). This property is useful when the items are being represented by an icon view.

The resizeMode() and layoutMode() govern how and when the items are laid out. Items are spaced according to their spacing(), and can exist within a notional grid of size specified by gridSize(). The items can be rendered as large or small icons depending on their iconSize().







A Windows XP style list view. A Macintosh style list view. A Plastique style list view.

Improving Performance

It is possible to give the view hints about the data it is handling in order to improve its performance when displaying large numbers of items. One approach that can be taken for views that are intended to display items with equal sizes is to set the
uniformItemSizes property to true.

See also:
View Classes, QTreeView, QTableView, and QListWidget.


Nested Class Summary
static class QListView.Flow
           
static class QListView.LayoutMode
          See also.
batchSize.
static class QListView.Movement
           
static class QListView.ResizeMode
           
static class QListView.ViewMode
           
 
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QAbstractItemView
QAbstractItemView.CursorAction, QAbstractItemView.DragDropMode, QAbstractItemView.DropIndicatorPosition, QAbstractItemView.EditTrigger, QAbstractItemView.EditTriggers, QAbstractItemView.ScrollHint, QAbstractItemView.ScrollMode, QAbstractItemView.SelectionBehavior, QAbstractItemView.SelectionMode, QAbstractItemView.State
 
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QFrame
QFrame.Shadow, QFrame.Shape, QFrame.StyleMask
 
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget
QWidget.RenderFlag, QWidget.RenderFlags
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.PrivateSignal0, QSignalEmitter.PrivateSignal1, QSignalEmitter.PrivateSignal2, QSignalEmitter.PrivateSignal3, QSignalEmitter.PrivateSignal4, QSignalEmitter.PrivateSignal5, QSignalEmitter.PrivateSignal6, QSignalEmitter.PrivateSignal7, QSignalEmitter.PrivateSignal8, QSignalEmitter.PrivateSignal9, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal
 
Field Summary
 QSignalEmitter.Signal1 indexesMoved
          This signal takes 1 generic argument(s).
 
Fields inherited from class com.trolltech.qt.gui.QAbstractItemView
activated, clicked, doubleClicked, entered, pressed, viewportEntered
 
Fields inherited from class com.trolltech.qt.gui.QWidget
customContextMenuRequested
 
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
currentSender
 
Constructor Summary
QListView()
          Creates a new QListView with the given parent to view a model.
QListView(QWidget parent)
          Creates a new QListView with the given parent to view a model.
 
Method Summary
 int batchSize()
          This property holds the number of items laid out in each batch if layoutMode is set to Batched .
 void clearPropertyFlags()
          Clears the QListView-specific property flags.
 QListView.Flow flow()
          This property holds which direction the items layout should flow.
 QSize gridSize()
          This property holds the size of the layout grid.
protected  void internalDrag(Qt.DropAction[] supportedActions)
          This is an overloaded method provided for convenience.
 boolean isRowHidden(int row)
          Returns true if the row is hidden; otherwise returns false.
 boolean isSelectionRectVisible()
          This property holds if the selection rectangle should be visible.
 boolean isWrapping()
          This property holds whether the items layout should wrap.
 QListView.LayoutMode layoutMode()
          This property determines whether the layout of items should happen immediately or be delayed.
 int modelColumn()
          This property holds the column in the model that is visible.
 QListView.Movement movement()
          This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.
protected  QRect rectForIndex(com.trolltech.qt.core.QModelIndex index)
          Returns the rectangle of the item at position index in the model.
 QListView.ResizeMode resizeMode()
          This property holds whether the items are laid out again when the view is resized.
 void setBatchSize(int batchSize)
          This property holds the number of items laid out in each batch if layoutMode is set to Batched .
 void setFlow(QListView.Flow flow)
          This property holds which direction the items layout should flow.
 void setGridSize(QSize size)
          This property holds the size of the layout grid.
 void setLayoutMode(QListView.LayoutMode mode)
          This property determines whether the layout of items should happen immediately or be delayed.
 void setModelColumn(int column)
          This property holds the column in the model that is visible.
 void setMovement(QListView.Movement movement)
          This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.
protected  void setPositionForIndex(QPoint position, com.trolltech.qt.core.QModelIndex index)
          Sets the contents position of the item at index in the model to the given position.
 void setResizeMode(QListView.ResizeMode mode)
          This property holds whether the items are laid out again when the view is resized.
 void setRowHidden(int row, boolean hide)
          If hide is true, the given row will be hidden; otherwise the row will be shown.
 void setSelectionRectVisible(boolean show)
          This property holds if the selection rectangle should be visible.
 void setSpacing(int space)
          This property holds the space between items in the layout.
 void setUniformItemSizes(boolean enable)
          This property holds whether all items in the listview have the same size.
 void setViewMode(QListView.ViewMode mode)
          This property holds the view mode of the QListView.
 void setWordWrap(boolean on)
          This property holds the item text word-wrapping policy.
 void setWrapping(boolean enable)
          This property holds whether the items layout should wrap.
 int spacing()
          This property holds the space between items in the layout.
 boolean uniformItemSizes()
          This property holds whether all items in the listview have the same size.
 QListView.ViewMode viewMode()
          This property holds the view mode of the QListView.
 boolean wordWrap()
          This property holds the item text word-wrapping policy.
 
Methods inherited from class com.trolltech.qt.gui.QAbstractItemView
alternatingRowColors, autoScrollMargin, clearSelection, closeEditor, closePersistentEditor, commitData, currentChanged, currentIndex, dataChanged, dirtyRegionOffset, dragDropMode, dragDropOverwriteMode, dragEnabled, dropIndicatorPosition, edit, edit, editorDestroyed, editTriggers, executeDelayedItemsLayout, hasAutoScroll, horizontalOffset, horizontalScrollMode, iconSize, indexAt, indexWidget, isIndexHidden, itemDelegate, itemDelegate, itemDelegateForColumn, itemDelegateForRow, keyboardSearch, model, moveCursor, openPersistentEditor, reset, rootIndex, rowsAboutToBeRemoved, rowsInserted, scheduleDelayedItemsLayout, scrollDirtyRegion, scrollTo, scrollTo, scrollToBottom, scrollToTop, selectAll, selectedIndexes, selectionBehavior, selectionChanged, selectionCommand, selectionCommand, selectionMode, selectionModel, setAlternatingRowColors, setAutoScroll, setAutoScrollMargin, setCurrentIndex, setDirtyRegion, setDragDropMode, setDragDropOverwriteMode, setDragEnabled, setDropIndicatorShown, setEditTriggers, setEditTriggers, setHorizontalScrollMode, setIconSize, setIndexWidget, setItemDelegate, setItemDelegateForColumn, setItemDelegateForRow, setModel, setRootIndex, setSelection, setSelectionBehavior, setSelectionMode, setSelectionModel, setState, setTabKeyNavigation, setTextElideMode, setVerticalScrollMode, showDropIndicator, sizeHintForColumn, sizeHintForIndex, sizeHintForRow, startDrag, startDrag, state, tabKeyNavigation, textElideMode, update, updateGeometries, verticalOffset, verticalScrollMode, viewOptions, visualRect, visualRegionForSelection
 
Methods inherited from class com.trolltech.qt.gui.QAbstractScrollArea
addScrollBarWidget, addScrollBarWidget, cornerWidget, horizontalScrollBar, horizontalScrollBarPolicy, maximumViewportSize, scrollBarWidgets, scrollBarWidgets, scrollContentsBy, setCornerWidget, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setupViewport, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportMargins, verticalScrollBar, verticalScrollBarPolicy, viewport, viewportEvent
 
Methods inherited from class com.trolltech.qt.gui.QFrame
frameRect, frameShadow, frameShape, frameStyle, frameWidth, lineWidth, midLineWidth, setFrameRect, setFrameShadow, setFrameShape, setFrameStyle, setLineWidth, setMidLineWidth
 
Methods inherited from class com.trolltech.qt.gui.QWidget
acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsRect, contextMenuEvent, contextMenuPolicy, cursor, depth, destroy, destroy, destroy, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabKeyboard, grabMouse, grabMouse, grabShortcut, grabShortcut, graphicsProxyWidget, hasFocus, hasMouseTracking, height, heightForWidth, heightMM, hide, hideEvent, inputContext, inputMethodEvent, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isMaximized, isMinimized, isModal, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, keyPressEvent, keyReleaseEvent, languageChange, layout, layoutDirection, leaveEvent, locale, logicalDpiX, logicalDpiY, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, numColors, overrideWindowFlags, overrideWindowFlags, overrideWindowState, paintEngine, paintEvent, paintingActive, palette, parentWidget, physicalDpiX, physicalDpiY, pos, raise, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, render, render, render, render, render, render, render, render, repaint, repaint, repaint, repaint, resetInputContext, resize, resize, resizeEvent, restoreGeometry, saveGeometry, scroll, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setBaseSize, setContentsMargins, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedSize, setFixedWidth, setFocus, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGeometry, setHidden, setInputContext, setLayout, setLayoutDirection, setLocale, setMask, setMask, setMaximumHeight, setMaximumSize, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setParent, setParent, setShortcutAutoRepeat, setShortcutAutoRepeat, setShortcutEnabled, setShortcutEnabled, setSizeIncrement, setSizeIncrement, setSizePolicy, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowState, setWindowTitle, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, underMouse, unsetCursor, unsetLayoutDirection, unsetLocale, update, update, update, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, widthMM, window, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, winId, x, y
 
Methods inherited from class com.trolltech.qt.core.QObject
childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
__qt_signalInitialization
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Field Detail

indexesMoved

public final QSignalEmitter.Signal1 indexesMoved

This signal takes 1 generic argument(s). We list their type and the name they go by in the description of this signal. <java.util.List(named: indexes)>:

This signal is emitted when the specified indexes are moved in the view.

Constructor Detail

QListView

public QListView()
Creates a new QListView with the given parent to view a model. Use setModel() to set the model.


QListView

public QListView(QWidget parent)
Creates a new QListView with the given parent to view a model. Use setModel() to set the model.

Method Detail

batchSize

public final int batchSize()
This property holds the number of items laid out in each batch if layoutMode is set to Batched . The default value is 100.


clearPropertyFlags

public final void clearPropertyFlags()
Clears the QListView-specific property flags. See viewMode.

Properties inherited from QAbstractItemView are not covered by the property flags. Specifically, dragEnabled and acceptsDrops are computed by QListView when calling setMovement() or setViewMode().


flow

public final QListView.Flow flow()
This property holds which direction the items layout should flow. If this property is LeftToRight , the items will be laid out left to right. If the isWrapping property is true, the layout will wrap when it reaches the right side of the visible area. If this property is TopToBottom , the items will be laid out from the top of the visible area, wrapping when it reaches the bottom.

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

By default, this property is set to TopToBottom .

See also:
viewMode.


gridSize

public final QSize gridSize()
This property holds the size of the layout grid. This property is the size of the grid in which the items are laid out. The default is an empty size which means that there is no grid and the layout is not done in a grid. Setting this property to a non-empty size switches on the grid layout. (When a grid layout is in force the spacing property is ignored.)

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

See also:
viewMode.


internalDrag

protected final void internalDrag(Qt.DropAction[] supportedActions)
This is an overloaded method provided for convenience.


isRowHidden

public final boolean isRowHidden(int row)
Returns true if the row is hidden; otherwise returns false.


isSelectionRectVisible

public final boolean isSelectionRectVisible()
This property holds if the selection rectangle should be visible. If this property is true then the selection rectangle is visible; otherwise it will be hidden.

Note: The selection rectangle will only be visible if the selection mode is in a mode where more than one item can be selected; i.e., it will not draw a selection rectangle if the selection mode is QAbstractItemView::SingleSelection .

By default, this property is false.


isWrapping

public final boolean isWrapping()
This property holds whether the items layout should wrap. This property holds whether the layout should wrap when there is no more space in the visible area. The point at which the layout wraps depends on the flow property.

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

By default, this property is false.

See also:
viewMode.


layoutMode

public final QListView.LayoutMode layoutMode()
This property determines whether the layout of items should happen immediately or be delayed. This property holds the layout mode for the items. When the mode is SinglePass (the default), the items are laid out all in one go. When the mode is Batched , the items are laid out in batches of batchSize items, while processing events. This makes it possible to instantly view and interact with the visible items while the rest are being laid out.

See also:
viewMode.


modelColumn

public final int modelColumn()
This property holds the column in the model that is visible. By default, this property contains 0, indicating that the first column in the model will be shown.


movement

public final QListView.Movement movement()
This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all. This property determines how the user can move the items in the view. Static means that the items can't be moved the user. Free means that the user can drag and drop the items to any position in the view. Snap means that the user can drag and drop the items, but only to the positions in a notional grid signified by the gridSize property.

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

By default, this property is set to Static .

See also:
gridSize, resizeMode, and viewMode.


rectForIndex

protected final QRect rectForIndex(com.trolltech.qt.core.QModelIndex index)
Returns the rectangle of the item at position index in the model. The rectangle is in contents coordinates.

See also:
visualRect().


resizeMode

public final QListView.ResizeMode resizeMode()
This property holds whether the items are laid out again when the view is resized. If this property is Adjust , the items will be laid out again when the view is resized. If the value is Fixed , the items will not be laid out when the view is resized.

By default, this property is set to Fixed .

See also:
movement, gridSize, and viewMode.


setBatchSize

public final void setBatchSize(int batchSize)
This property holds the number of items laid out in each batch if layoutMode is set to Batched . The default value is 100.


setFlow

public final void setFlow(QListView.Flow flow)
This property holds which direction the items layout should flow. If this property is LeftToRight , the items will be laid out left to right. If the isWrapping property is true, the layout will wrap when it reaches the right side of the visible area. If this property is TopToBottom , the items will be laid out from the top of the visible area, wrapping when it reaches the bottom.

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

By default, this property is set to TopToBottom .

See also:
viewMode.


setGridSize

public final void setGridSize(QSize size)
This property holds the size of the layout grid. This property is the size of the grid in which the items are laid out. The default is an empty size which means that there is no grid and the layout is not done in a grid. Setting this property to a non-empty size switches on the grid layout. (When a grid layout is in force the spacing property is ignored.)

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

See also:
viewMode.


setLayoutMode

public final void setLayoutMode(QListView.LayoutMode mode)
This property determines whether the layout of items should happen immediately or be delayed. This property holds the layout mode for the items. When the mode is SinglePass (the default), the items are laid out all in one go. When the mode is Batched , the items are laid out in batches of batchSize items, while processing events. This makes it possible to instantly view and interact with the visible items while the rest are being laid out.

See also:
viewMode.


setModelColumn

public final void setModelColumn(int column)
This property holds the column in the model that is visible. By default, this property contains 0, indicating that the first column in the model will be shown.


setMovement

public final void setMovement(QListView.Movement movement)
This property holds whether the items can be moved freely, are snapped to a grid, or cannot be moved at all. This property determines how the user can move the items in the view. Static means that the items can't be moved the user. Free means that the user can drag and drop the items to any position in the view. Snap means that the user can drag and drop the items, but only to the positions in a notional grid signified by the gridSize property.

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

By default, this property is set to Static .

See also:
gridSize, resizeMode, and viewMode.


setPositionForIndex

protected final void setPositionForIndex(QPoint position,
                                         com.trolltech.qt.core.QModelIndex index)
Sets the contents position of the item at index in the model to the given position. If the list view's movement mode is Static, this function will have no effect.


setResizeMode

public final void setResizeMode(QListView.ResizeMode mode)
This property holds whether the items are laid out again when the view is resized. If this property is Adjust , the items will be laid out again when the view is resized. If the value is Fixed , the items will not be laid out when the view is resized.

By default, this property is set to Fixed .

See also:
movement, gridSize, and viewMode.


setRowHidden

public final void setRowHidden(int row,
                               boolean hide)
If hide is true, the given row will be hidden; otherwise the row will be shown.

See also:
isRowHidden().


setSelectionRectVisible

public final void setSelectionRectVisible(boolean show)
This property holds if the selection rectangle should be visible. If this property is true then the selection rectangle is visible; otherwise it will be hidden.

Note: The selection rectangle will only be visible if the selection mode is in a mode where more than one item can be selected; i.e., it will not draw a selection rectangle if the selection mode is QAbstractItemView::SingleSelection .

By default, this property is false.


setSpacing

public final void setSpacing(int space)
This property holds the space between items in the layout. This property is the size of the empty space that is padded around an item in the layout.

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

By default, this property contains a value of 0.

See also:
viewMode.


setUniformItemSizes

public final void setUniformItemSizes(boolean enable)
This property holds whether all items in the listview have the same size. This property should only be set to true if it is guaranteed that all items in the view have the same size. This enables the view to do some optimizations for performance purposes.

By default, this property is false.


setViewMode

public final void setViewMode(QListView.ViewMode mode)
This property holds the view mode of the QListView. This property will change the other unset properties to conform with the set view mode. QListView-specific properties that have already been set will not be changed, unless clearPropertyFlags() has been called.

Setting the view mode will enable or disable drag and drop based on the selected movement. For ListMode , the default movement is Static (drag and drop disabled); for IconMode , the default movement is Free (drag and drop enabled).

See also:
isWrapping, spacing, gridSize, flow, movement, and resizeMode.


setWordWrap

public final void setWordWrap(boolean on)
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 false by default.

Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's textElideMode.


setWrapping

public final void setWrapping(boolean enable)
This property holds whether the items layout should wrap. This property holds whether the layout should wrap when there is no more space in the visible area. The point at which the layout wraps depends on the flow property.

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

By default, this property is false.

See also:
viewMode.


spacing

public final int spacing()
This property holds the space between items in the layout. This property is the size of the empty space that is padded around an item in the layout.

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

By default, this property contains a value of 0.

See also:
viewMode.


uniformItemSizes

public final boolean uniformItemSizes()
This property holds whether all items in the listview have the same size. This property should only be set to true if it is guaranteed that all items in the view have the same size. This enables the view to do some optimizations for performance purposes.

By default, this property is false.


viewMode

public final QListView.ViewMode viewMode()
This property holds the view mode of the QListView. This property will change the other unset properties to conform with the set view mode. QListView-specific properties that have already been set will not be changed, unless clearPropertyFlags() has been called.

Setting the view mode will enable or disable drag and drop based on the selected movement. For ListMode , the default movement is Static (drag and drop disabled); for IconMode , the default movement is Free (drag and drop enabled).

See also:
isWrapping, spacing, gridSize, flow, movement, and resizeMode.


wordWrap

public final boolean wordWrap()
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 false by default.

Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's textElideMode.