- inline QPersistentModelIndex index() const { return _index; }
- inline const MessageModel *model() const { return _index.isValid() ? qobject_cast<const MessageModel *>(_index.model()) : 0; }
- inline int row() const { return _index.isValid() ? _index.row() : 0; }
- inline ChatScene *chatScene() const { return qobject_cast<ChatScene *>(scene()); }
+ inline const QAbstractItemModel *model() const { return chatScene() ? chatScene()->model() : 0; }
+ int row() const;
+ inline int column() const { return _col; }
+ inline ChatScene *chatScene() const { return qobject_cast<ChatScene *>(scene()); }