From 4551b2421c47d2bba261b2202b019e6cc8a4af28 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Tue, 1 Feb 2011 15:48:42 -0300 Subject: Updated QAbstractItemModel.createIndex documentation to warning about ptr argument life time. Reviewer: Luciano Wolf Marcelo Lira --- PySide/QtCore/typesystem_core.xml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'PySide/QtCore') diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index 41b77438e..815c8a044 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -1052,16 +1052,32 @@ - + - + + + + + + + + + + %PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%CPPSELF.%FUNCTION_NAME(%1, %2, %PYARG_3)); + + Creates a model index for the given row and column with the internal pointer ptr. + When using a QSortFilterProxyModel, its indexes have their own internal pointer. It is not advisable to access this internal pointer outside of the model. Use the data() function instead. + This function provides a consistent interface that model subclasses must use to create model indexes. + + .. warning:: Because of some Qt/Python itegration rules, the ptr argument do not get the reference incremented during the QModelIndex life time. So it is necessary to keep the object used on ptr argument alive during the whole process. Do not destroy the object if you are not sure about that. + -- cgit v1.2.3