qt - Replacing items in a QTableWidget -
if create new qtablewidgetitem
, insert/set cell on qtablewidget
has existing item, previous itemy deleted or there memory leak? need retrieve existing item , change properties?
when insert qtablewidgetitem
qtablewidget
using qtablewidget::setitem()
table takes ownership of item, means manage you. if call setitem()
column , row has item, table delete old item you. no memory leak. you're safe!
Comments
Post a Comment