|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.core.QAbstractItemModel
com.trolltech.qt.gui.QStandardItemModel
public class QStandardItemModel
The QStandardItemModel class provides a generic model for storing custom data.
QStandardItemModel can be used as a repository for standard Qt data types. It is one of the Model/View Classes and is part of Qt's model/view framework.
QStandardItemModel provides a classic item-based approach to working with the model. The items in a QStandardItemModel are provided by QStandardItem.
QStandardItemModel implements the QAbstractItemModel interface, which means that the model can be used to provide data in any view that supports that interface (such as QListView, QTableView and QTreeView, and your own custom views). For performance and flexibility, you may want to subclass QAbstractItemModel to provide support for different kinds of data repositories. For example, the QDirModel provides a model interface to the underlying file system, and does not actually store file information internally.
When you want a list or tree, you typically create an empty QStandardItemModel and use appendRow to add items to the model, and item to access an item. If your model represents a table, you typically pass the dimensions of the table to the QStandardItemModel constructor and use setItem to position items into the table. You can also use setRowCount and setColumnCount to alter the dimensions of the model. To insert items, use insertRow or insertColumn, and to remove items, use removeRow or removeColumn.
You can set the header labels of your model with setHorizontalHeaderLabels and setVerticalHeaderLabels.
You can search for items in the model with findItems, and sort the model by calling sort.
Call clear to remove all items from the model.
An example usage of QStandardItemModel to create a table:
QStandardItemModel model(4, 4); for (int row = 0; row < 4; ++row) { for (int column = 0; column < 4; ++column) { QStandardItem *item = new QStandardItem(QString("row %0, column %1").arg(row).arg(column)); model.setItem(row, column, item); } }
An example usage of QStandardItemModel to create a tree:
QStandardItemModel model; QStandardItem *parentItem = model.invisibleRootItem(); for (int i = 0; i < 4; ++i) { QStandardItem *item = new QStandardItem(QString("item %0").arg(i)); parentItem->appendRow(item); parentItem = item; }
After setting the model on a view, you typically want to react to user actions, such as an item being clicked. Since a QAbstractItemView provides QModelIndex-based signals and functions, you need a way to obtain the QStandardItem that corresponds to a given QModelIndex, and vice versa. itemFromIndex and indexFromItem provide this mapping. Typical usage of itemFromIndex includes obtaining the item at the current index in a view, and obtaining the item that corresponds to an index carried by a QAbstractItemView signal, such as QAbstractItemView::clicked(). First you connect the view's signal to a slot in your class:
QTreeView *treeView = new QTreeView(this); treeView->setModel(myStandardItemModel); connect(treeView, SIGNAL(clicked(QModelIndex)), this, SLOT(clicked(QModelIndex)));
When you receive the signal, you call itemFromIndex on the given model index to get a pointer to the item:
void MyWidget::clicked(const QModelIndex &index)
{
QStandardItem *item = myStandardItemModel->itemFromIndex(index);
// Do stuff with the item ...
}
Conversely, you must obtain the QModelIndex of an item when you want to invoke a model/view function that takes an index as argument. You can obtain the index either by using the model's indexFromItem function, or, equivalently, by calling QStandardItem::index():
treeView->scrollTo(item->index());
You are, of course, not required to use the item-based approach; you could instead rely entirely on the QAbstractItemModel interface when working with the model, or use a combination of the two as appropriate.
Tree Model example
,
Item View Convenience ClassesNested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Field Summary | |
---|---|
QSignalEmitter.Signal1<QStandardItem> |
itemChanged
This signal is emitted whenever the data of item has changed. |
Fields inherited from class com.trolltech.qt.core.QAbstractItemModel |
---|
dataChanged, headerDataChanged, layoutAboutToBeChanged, layoutChanged |
Constructor Summary | |
---|---|
QStandardItemModel()
Equivalent to QStandardItemModel(0). |
|
QStandardItemModel(int rows,
int columns)
Equivalent to QStandardItemModel(rows, columns, 0). |
|
QStandardItemModel(int rows,
int columns,
QObject parent)
Constructs a new item model that initially has rows rows and columns columns, and that has the given parent. |
|
QStandardItemModel(QObject parent)
Constructs a new item model with the given parent. |
Method Summary | |
---|---|
void |
appendColumn(java.util.List<QStandardItem> items)
Appends a column containing items. |
void |
appendRow(java.util.List<QStandardItem> items)
Appends a row containing items. |
void |
appendRow(QStandardItem item)
When building a list or a tree that has only one column, this function provides a convenient way to append a single new item. |
void |
clear()
Removes all items (including header items) from the model and sets the number of rows and columns to zero. |
int |
columnCount(QModelIndex parent)
Returns the number of columns for the children of the given parent. |
java.lang.Object |
data(QModelIndex index,
int role)
Returns the data stored under the given role for the item referred to by the index. |
java.util.List<QStandardItem> |
findItems(java.lang.String text)
Returns a list of items that match the given text. |
java.util.List<QStandardItem> |
findItems(java.lang.String text,
Qt.MatchFlags flags)
Returns a list of items that match the given text, using the given flags. |
java.util.List<QStandardItem> |
findItems(java.lang.String text,
Qt.MatchFlags flags,
int column)
Returns a list of items that match the given text, using the given flags, in the given column. |
Qt.ItemFlags |
flags(QModelIndex index)
Returns the item flags for the given index. |
static QStandardItemModel |
fromNativePointer(QNativePointer nativePointer)
This function returns the QStandardItemModel instance pointed to by nativePointer |
boolean |
hasChildren(QModelIndex parent)
Returns true if parent has any children; otherwise returns false. |
java.lang.Object |
headerData(int section,
Qt.Orientation orientation,
int role)
Returns the data for the given role and section in the header with the specified orientation. |
QStandardItem |
horizontalHeaderItem(int column)
Returns the horizontal header item for column if one has been set; otherwise returns 0. |
QModelIndex |
index(int row,
int column,
QModelIndex parent)
Returns the index of the item in the model specified by the given row, column and parent index. |
QModelIndex |
indexFromItem(QStandardItem item)
Returns the QModelIndex associated with the given item. |
void |
insertColumn(int column,
java.util.List<QStandardItem> items)
Inserts a column at column containing items. |
boolean |
insertColumns(int column,
int count,
QModelIndex parent)
On models that support this, inserts count new columns into the model before the given column. |
void |
insertRow(int row,
java.util.List<QStandardItem> items)
Inserts a row at row containing items. |
void |
insertRow(int row,
QStandardItem item)
Inserts a row at row containing item. |
boolean |
insertRows(int row,
int count,
QModelIndex parent)
On models that support this, inserts count rows into the model before the given row. |
QStandardItem |
invisibleRootItem()
Returns the model's invisible root item. |
QStandardItem |
item(int row)
Equivalent to item(row, 0). |
QStandardItem |
item(int row,
int column)
Returns the item for the given row and column if one has been set; otherwise returns 0. |
java.util.SortedMap<java.lang.Integer,java.lang.Object> |
itemData(QModelIndex index)
Returns a map with values for all predefined roles in the model for the item at the given index. |
QStandardItem |
itemFromIndex(QModelIndex index)
Returns a pointer to the QStandardItem associated with the given index. |
QStandardItem |
itemPrototype()
Returns the item prototype used by the model. |
QModelIndex |
parent(QModelIndex child)
Returns the parent of the model item with the given child, or QModelIndex() if it has no parent. |
boolean |
removeColumns(int column,
int count,
QModelIndex parent)
On models that support this, removes count columns starting with the given column under parent parent from the model. |
boolean |
removeRows(int row,
int count,
QModelIndex parent)
On models that support this, removes count rows starting with the given row under parent parent from the model. |
int |
rowCount(QModelIndex parent)
Returns the number of rows under the given parent. |
void |
setColumnCount(int columns)
Sets the number of columns in this model to columns. |
boolean |
setData(QModelIndex index,
java.lang.Object value,
int role)
Sets the role data for the item at index to value. |
boolean |
setHeaderData(int section,
Qt.Orientation orientation,
java.lang.Object value,
int role)
Sets the data for the given role and section in the header with the specified orientation to the value supplied. |
void |
setHorizontalHeaderItem(int column,
QStandardItem item)
Sets the horizontal header item for column to item. |
void |
setHorizontalHeaderLabels(java.util.List<java.lang.String> labels)
Sets the horizontal header labels using labels. |
void |
setItem(int row,
int column,
QStandardItem item)
Sets the item for the given row and column to item. |
void |
setItem(int row,
QStandardItem item)
This is an overloaded method provided for convenience. |
boolean |
setItemData(QModelIndex index,
java.util.SortedMap<java.lang.Integer,java.lang.Object> roles)
This is an overloaded function provided for convenience. |
void |
setItemPrototype(QStandardItem item)
Sets the item prototype for the model to the specified item. |
void |
setRowCount(int rows)
Sets the number of rows in this model to rows. |
void |
setSortRole(int role)
Sets the item role that is used to query the model's data when sorting items to role. |
void |
setVerticalHeaderItem(int row,
QStandardItem item)
Sets the vertical header item for row to item. |
void |
setVerticalHeaderLabels(java.util.List<java.lang.String> labels)
Sets the vertical header labels using labels. |
void |
sort(int column,
Qt.SortOrder order)
Sorts the model by column in the given order. |
int |
sortRole()
Returns the item role that is used to query the model's data when sorting items. |
Qt.DropActions |
supportedDropActions()
Returns the drop actions supported by this model. |
java.util.List<QStandardItem> |
takeColumn(int column)
Removes the given column without deleting the column items, and returns a list of pointers to the removed items. |
QStandardItem |
takeHorizontalHeaderItem(int column)
Removes the horizontal header item at column from the header without deleting it, and returns a pointer to the item. |
QStandardItem |
takeItem(int row)
Equivalent to takeItem(row, 0). |
QStandardItem |
takeItem(int row,
int column)
Removes the item at (row, column) without deleting it. |
java.util.List<QStandardItem> |
takeRow(int row)
Removes the given row without deleting the row items, and returns a list of pointers to the removed items. |
QStandardItem |
takeVerticalHeaderItem(int row)
Removes the vertical header item at row from the header without deleting it, and returns a pointer to the item. |
QStandardItem |
verticalHeaderItem(int row)
Returns the vertical header item for row row if one has been set; otherwise returns 0. |
Methods inherited from class com.trolltech.qt.core.QAbstractItemModel |
---|
beginInsertColumns, beginInsertRows, beginRemoveColumns, beginRemoveRows, buddy, canFetchMore, changePersistentIndex, changePersistentIndexList, columnCount, createIndex, createIndex, createIndex, data, data, data, decodeData, dropMimeData, encodeData, endInsertColumns, endInsertRows, endRemoveColumns, endRemoveRows, fetchMore, hasChildren, hasIndex, hasIndex, headerData, index, insertColumn, insertColumn, insertColumns, insertRow, insertRow, insertRows, match, match, match, match, mimeData, mimeTypes, persistentIndexList, removeColumn, removeColumn, removeColumns, removeRow, removeRow, removeRows, reset, revert, rowCount, setData, setData, setData, setHeaderData, setSupportedDragActions, setSupportedDragActions, sibling, sort, span, submit, supportedDragActions |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
blockSignals, childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
disconnect, disconnect, signalSender |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Field Detail |
---|
public final QSignalEmitter.Signal1<QStandardItem> itemChanged
This signal is emitted whenever the data of item has changed.
Constructor Detail |
---|
public QStandardItemModel()
Equivalent to QStandardItemModel(0).
public QStandardItemModel(QObject parent)
Constructs a new item model with the given parent.
public QStandardItemModel(int rows, int columns)
Equivalent to QStandardItemModel(rows, columns, 0).
public QStandardItemModel(int rows, int columns, QObject parent)
Constructs a new item model that initially has rows rows and columns columns, and that has the given parent.
Method Detail |
---|
public final void appendColumn(java.util.List<QStandardItem> items)
Appends a column containing items. If necessary, the row count is increased to the size of items.
public final void appendRow(QStandardItem item)
When building a list or a tree that has only one column, this function provides a convenient way to append a single new item.
public final void appendRow(java.util.List<QStandardItem> items)
Appends a row containing items. If necessary, the column count is increased to the size of items.
public final void clear()
Removes all items (including header items) from the model and sets the number of rows and columns to zero.
public final java.util.List<QStandardItem> findItems(java.lang.String text, Qt.MatchFlags flags)
public final java.util.List<QStandardItem> findItems(java.lang.String text)
public final java.util.List<QStandardItem> findItems(java.lang.String text, Qt.MatchFlags flags, int column)
Returns a list of items that match the given text, using the given flags, in the given column.
public final QStandardItem horizontalHeaderItem(int column)
Returns the horizontal header item for column if one has been set; otherwise returns 0.
public final QModelIndex indexFromItem(QStandardItem item)
Returns the QModelIndex associated with the given item.
Use this function when you want to perform an operation that requires the QModelIndex of the item, such as QAbstractItemView::scrollTo(). QStandardItem::index() is provided as convenience; it is equivalent to calling this function.
public final void insertColumn(int column, java.util.List<QStandardItem> items)
Inserts a column at column containing items. If necessary, the row count is increased to the size of items.
public final void insertRow(int row, QStandardItem item)
Inserts a row at row containing item.
When building a list or a tree that has only one column, this function provides a convenient way to append a single new item.
public final void insertRow(int row, java.util.List<QStandardItem> items)
Inserts a row at row containing items. If necessary, the column count is increased to the size of items.
public final QStandardItem invisibleRootItem()
Returns the model's invisible root item.
The invisible root item provides access to the model's top-level items through the QStandardItem API, making it possible to write functions that can treat top-level items and their children in a uniform way; for example, recursive functions involving a tree model.
public final QStandardItem item(int row)
Equivalent to item(row, 0).
public final QStandardItem item(int row, int column)
Returns the item for the given row and column if one has been set; otherwise returns 0.
public final QStandardItem itemFromIndex(QModelIndex index)
Returns a pointer to the QStandardItem associated with the given index.
Calling this function is typically the initial step when processing QModelIndex-based signals from a view, such as QAbstractItemView::activated(). In your slot, you call itemFromIndex, with the QModelIndex carried by the signal as argument, to obtain a pointer to the corresponding QStandardItem.
Note that this function will lazily create an item for the index (using itemPrototype), and set it in the parent item's child table, if no item already exists at that index.
If index is an invalid index, this function returns 0.
public final QStandardItem itemPrototype()
Returns the item prototype used by the model. The model uses the item prototype as an item factory when it needs to construct new items on demand (for instance, when a view or item delegate calls setData).
public final void setColumnCount(int columns)
Sets the number of columns in this model to columns. If this is less than columnCount, the data in the unwanted columns is discarded.
public final void setHorizontalHeaderItem(int column, QStandardItem item)
Sets the horizontal header item for column to item. The model takes ownership of the item. If necessary, the column count is increased to fit the item. The previous header item (if there was one) is deleted.
public final void setHorizontalHeaderLabels(java.util.List<java.lang.String> labels)
Sets the horizontal header labels using labels. If necessary, the column count is increased to the size of labels.
public final void setItem(int row, QStandardItem item)
public final void setItem(int row, int column, QStandardItem item)
Sets the item for the given row and column to item. The model takes ownership of the item. If necessary, the row count and column count are increased to fit the item. The previous item at the given location (if there was one) is deleted.
public final void setItemPrototype(QStandardItem item)
Sets the item prototype for the model to the specified item. The model takes ownership of the prototype.
The item prototype acts as a QStandardItem factory, by relying on the QStandardItem::clone() function. To provide your own prototype, subclass QStandardItem, reimplement QStandardItem::clone() and set the prototype to be an instance of your custom class. Whenever QStandardItemModel needs to create an item on demand (for instance, when a view or item delegate calls setData)), the new items will be instances of your custom class.
public final void setRowCount(int rows)
Sets the number of rows in this model to rows. If this is less than rowCount, the data in the unwanted rows is discarded.
public final void setSortRole(int role)
Sets the item role that is used to query the model's data when sorting items to role.
The default value is Qt::DisplayRole.
public final void setVerticalHeaderItem(int row, QStandardItem item)
Sets the vertical header item for row to item. The model takes ownership of the item. If necessary, the row count is increased to fit the item. The previous header item (if there was one) is deleted.
public final void setVerticalHeaderLabels(java.util.List<java.lang.String> labels)
Sets the vertical header labels using labels. If necessary, the row count is increased to the size of labels.
public final int sortRole()
Returns the item role that is used to query the model's data when sorting items.
The default value is Qt::DisplayRole.
public final java.util.List<QStandardItem> takeColumn(int column)
Removes the given column without deleting the column items, and returns a list of pointers to the removed items. The model releases ownership of the items. For items in the column that have not been set, the corresponding pointers in the list will be 0.
public final QStandardItem takeHorizontalHeaderItem(int column)
Removes the horizontal header item at column from the header without deleting it, and returns a pointer to the item. The model releases ownership of the item.
public final QStandardItem takeItem(int row)
Equivalent to takeItem(row, 0).
public final QStandardItem takeItem(int row, int column)
Removes the item at (row, column) without deleting it. The model releases ownership of the item.
public final java.util.List<QStandardItem> takeRow(int row)
Removes the given row without deleting the row items, and returns a list of pointers to the removed items. The model releases ownership of the items. For items in the row that have not been set, the corresponding pointers in the list will be 0.
public final QStandardItem takeVerticalHeaderItem(int row)
Removes the vertical header item at row from the header without deleting it, and returns a pointer to the item. The model releases ownership of the item.
public final QStandardItem verticalHeaderItem(int row)
Returns the vertical header item for row row if one has been set; otherwise returns 0.
public int columnCount(QModelIndex parent)
Returns the number of columns for the children of the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.
In most subclasses, the number of columns is independent of the parent. For example:
int DomModel::columnCount(const QModelIndex &/*parent*<!-- noop -->/) const
{
return 3;
}
Tip: When implementing a table based model, columnCount should return 0 when the parent is valid.
columnCount
in class QAbstractItemModel
public java.lang.Object data(QModelIndex index, int role)
Returns the data stored under the given role for the item referred to by the index.
data
in class QAbstractItemModel
public Qt.ItemFlags flags(QModelIndex index)
Returns the item flags for the given index.
The base class implementation returns a combination of flags that enables the item (ItemIsEnabled) and allows it to be selected (ItemIsSelectable).
flags
in class QAbstractItemModel
public boolean hasChildren(QModelIndex parent)
Returns true if parent has any children; otherwise returns false. Use rowCount on the parent to find out the number of children.
hasChildren
in class QAbstractItemModel
public java.lang.Object headerData(int section, Qt.Orientation orientation, int role)
Returns the data for the given role and section in the header with the specified orientation.
headerData
in class QAbstractItemModel
public QModelIndex index(int row, int column, QModelIndex parent)
Returns the index of the item in the model specified by the given row, column and parent index.
When reimplementing this function in a subclass, call createIndex to generate model indexes that other components can use to refer to items in your model.
index
in class QAbstractItemModel
public boolean insertColumns(int column, int count, QModelIndex parent)
On models that support this, inserts count new columns into the model before the given column. The items in each new column will be children of the item represented by the parent model index.
If column is 0, the columns are prepended to any existing columns. If column is columnCount, the columns are appended to any existing columns. If parent has no children, a single row with count columns is inserted.
Returns true if the columns were successfully inserted; otherwise returns false.
The base class implementation does nothing and returns false.
If you implement your own model, you can reimplement this function if you want to support insertions. Alternatively, you can provide you own API for altering the data.
insertColumns
in class QAbstractItemModel
public boolean insertRows(int row, int count, QModelIndex parent)
On models that support this, inserts count rows into the model before the given row. The items in the new row will be children of the item represented by the parent model index.
If row is 0, the rows are prepended to any existing rows in the parent. If row is rowCount, the rows are appended to any existing rows in the parent. If parent has no children, a single column with count rows is inserted.
Returns true if the rows were successfully inserted; otherwise returns false.
The base class implementation does nothing and returns false.
If you implement your own model, you can reimplement this function if you want to support insertions. Alternatively, you can provide you own API for altering the data.
insertRows
in class QAbstractItemModel
public java.util.SortedMap<java.lang.Integer,java.lang.Object> itemData(QModelIndex index)
Returns a map with values for all predefined roles in the model for the item at the given index.
Reimplemented this function if you want to extend the default behavior of this function to include custom roles in the map.
itemData
in class QAbstractItemModel
public QModelIndex parent(QModelIndex child)
Returns the parent of the model item with the given child, or QModelIndex() if it has no parent.
A common convention used in models that expose tree data structures is that only items in the first column have children. For that case, when reimplementing this function in a subclass the column of the returned QModelIndex would be 0.
parent
in class QAbstractItemModel
public boolean removeColumns(int column, int count, QModelIndex parent)
On models that support this, removes count columns starting with the given column under parent parent from the model. Returns true if the columns were successfully removed; otherwise returns false.
The base class implementation does nothing and returns false.
If you implement your own model, you can reimplement this function if you want to support removing. Alternatively, you can provide you own API for altering the data.
removeColumns
in class QAbstractItemModel
public boolean removeRows(int row, int count, QModelIndex parent)
On models that support this, removes count rows starting with the given row under parent parent from the model. Returns true if the rows were successfully removed; otherwise returns false.
The base class implementation does nothing and returns false.
If you implement your own model, you can reimplement this function if you want to support removing. Alternatively, you can provide you own API for altering the data.
removeRows
in class QAbstractItemModel
public int rowCount(QModelIndex parent)
Returns the number of rows under the given parent. When the parent is valid it means that rowCount is returning the number of children of parent.
Tip: When implementing a table based model, rowCount should return 0 when the parent is valid.
rowCount
in class QAbstractItemModel
public boolean setData(QModelIndex index, java.lang.Object value, int role)
Sets the role data for the item at index to value. Returns true if successful; otherwise returns false.
The dataChanged signal should be emitted if the data was successfully set.
The base class implementation returns false. This function and data must be reimplemented for editable models. Note that the dataChanged signal must be emitted explicitly when reimplementing this function.
setData
in class QAbstractItemModel
public boolean setHeaderData(int section, Qt.Orientation orientation, java.lang.Object value, int role)
Sets the data for the given role and section in the header with the specified orientation to the value supplied. Returns true if the header's data was updated; otherwise returns false.
Note that the headerDataChanged signal must be emitted explicitly when reimplementing this function.
setHeaderData
in class QAbstractItemModel
public boolean setItemData(QModelIndex index, java.util.SortedMap<java.lang.Integer,java.lang.Object> roles)
setItemData
in class QAbstractItemModel
public void sort(int column, Qt.SortOrder order)
Sorts the model by column in the given order.
The base class implementation does nothing.
sort
in class QAbstractItemModel
public Qt.DropActions supportedDropActions()
Returns the drop actions supported by this model.
The default implementation returns Qt::CopyAction. Reimplement this function if you wish to support additional actions. Note that you must also reimplement the dropMimeData function to handle the additional operations.
supportedDropActions
in class QAbstractItemModel
public static QStandardItemModel fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |