QAbstractItemDelegate problem!!!
-
QAbstractItemDelegate problem:
i inherite a class from QAbstractItemDelegate , in order to custom my own item appearence in QListWidget.
i set a m_nSize in the QAbstractItemDelegate, and update it outside the class dynamically. m_nSize is used in sizeHint(...), as return QSize(m_nSize, m_nSize);
however, i found when i dynamic change the m_nSize, the items in the QListWidget change into new size very slow and the Item rect seems still the old size, no matter if i call the QListWidget::update() or not. However, when i resize the widget, the result turns Right.