How does void QTableWidget::setItemPrototype ( const QTableWidgetItem * item ) clones objects?
Posted
by chappar
on Stack Overflow
See other posts from Stack Overflow
or by chappar
Published on 2010-03-15T04:50:29Z
Indexed on
2010/03/15
10:39 UTC
Read the original article
Hit count: 358
QTableWidget::setItemPrototype says following.
"The table widget will use the item prototype clone function when it needs to create a new table item. For example when the user is editing in an empty cell. This is useful when you have a QTableWidgetItem subclass and want to make sure that QTableWidget creates instances of your subclass."
How does this actually work as you can pass any of the QTableWidgetItem subclass pointer to setItemPrototype and at run time there is no way you can get the size of an object having just pointer to it?
© Stack Overflow or respective owner