Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.8.3
-
None
Description
QAbstractItemDelegate::sizeHintChanged() is non-const, and thus cannot be emitted from QAbstractItemDelegate::paint(), which is the only place in the virtual API that makes sense to emit it.
I assume the signal should be emitted when painting and the drawables do not fit in the QStyleOption-provided rect, or the rect is too big.
Otherwise, it seems I must directly connect the signal to some custom signal in my model subclass, but using the model directly from the delegate seems inappropriate for MVC.
My specific use case involves painting multiple rows of data into the item rect, and the number of rows varies as the input changes. My model is emitting dataChanged() appropriately, but this only triggers a repaint of the new data in the old rect.
What is the intended usage of this signal? Or should it be const so that it may be emitted from paint()?