Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.core
Class QModelIndex

    java.lang.Object
      com.trolltech.qt.core.QModelIndex

    public class QModelIndex

extends java.lang.Object

Method Summary
`QModelIndex` | `child(int arow, int acolumn)` Queries the model for a child index of this index.
`int` | `column()`
`java.lang.Object` | `data()` Queries the model for the default data for this index.
`java.lang.Object` | `data(int role)` Queries the model for data for this index.
`boolean` | `equals(java.lang.Object other)` Compares this model index to another
`int` | `hashCode()`
`long` | `internalId()`
`QAbstractItemModel` | `model()`
`QModelIndex` | `parent()` Queries the model for the parent of this item.
`int` | `row()`
`QModelIndex` | `sibling(int arow, int acolumn)` Queries the model for a sibling of this model index.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Method Detail

### row

    public int row()

### column

    public int column()

### internalId

    public long internalId()

### parent

    public QModelIndex parent()

  Queries the model for the parent of this item. This is equivalent to calling

       item.model().parent(item);

  Returns:
    The parent index for this model index.

### sibling

    public QModelIndex sibling(int arow,
                               int acolumn)

  Queries the model for a sibling of this model index.

  Parameters:
    `arow` - The row for the sibling.
    `acolumn` - The column for the sibling.
  Returns:
    The sibling of this item at the given position.

### child

    public QModelIndex child(int arow,
                             int acolumn)

  Queries the model for a child index of this index.

  Parameters:
    `arow` - the row of the child.
    `acolumn` - the column of the child.
  Returns:
    The child at the given position.

### data

    public java.lang.Object data()

  Queries the model for the default data for this index. The default data is specified in `Qt.ItemDataRole.DisplayRole`.

  Returns:
    The data for this index

### data

    public java.lang.Object data(int role)

  Queries the model for data for this index.

  Parameters:
    `role` - The data role to query for. The different data roles are available in `com.trolltech.qt.core.Qt.ItemDataRole`
  Returns:
    The data for this index.

### model

    public QAbstractItemModel model()

  Returns:
    The model for this index.

### equals

    public boolean equals(java.lang.Object other)

  Compares this model index to another

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `other` - The object to compare to
  Returns:
    True if the objects are equal; otherwise returns false.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD