[Qt-interest] delete QStandardItem but allocated buffer not free

John Weeks john at wavemetrics.com
Mon Nov 22 18:57:54 CET 2010


On Nov 22, 2010, at 8:23 AM, 163 mail wrote:

>  How can we delete the allocated QStandardItem , without memeory augment?

How about QStandardItemModel::removeRows or QStandardItemModel::takeRow or takeItem?

The description of the takeXXX functions has the provocotive statement, "Removes the item ... without deleting it. The model releases ownership of the item." This seems to imply that putting items into the model transfers ownership, and that removeRows might just delete them for you. Do some research in the documentation, including the base class QAbstractItemModel.

Regards,
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax   (503) 620-6754
email   support at WaveMetrics.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101122/cb26ffd0/attachment.html 


More information about the Qt-interest-old mailing list