Class QtModelIndex

java.lang.Object
org.qtproject.qt.android.QtModelIndex

public class QtModelIndex extends Object
Represents an index in a custom item model, similar to QModelindex in C++.
  • Constructor Details

    • QtModelIndex

      public QtModelIndex()
      Constructs a new QtModelIndex.
  • Method Details

    • column

      public int column()
      Returns the column of this index.
      Returns:
      The column.
    • data

      public Object data(int role)
      Retrieves data for this index based on the specified role.
      Parameters:
      role - The role for which data is requested.
      Returns:
      The data object.
    • internalId

      public long internalId()
      Returns the internal ID associated with this index.
      Returns:
      The internal ID.
    • isValid

      public boolean isValid()
      Checks if this index is valid.
      Returns:
      True if the index is valid, false otherwise.
    • parent

      public QtModelIndex parent()
      Returns the parent index of this index.
      Returns:
      The parent index.
    • row

      public int row()
      Returns the row of this index.
      Returns:
      The row.