ListView Custom delegate crash in paint
-
Hi,
Silly question but why are you painting a widget which has no size ?
-
No I am not painting on no size.
The animation reduces the size but still paint event is called because animation is resizing the widget.
-
What if you stop at one and then make the widget invisible rather that go to zero ?
-
Actually I suspected that the widget is getting of size 0. I tried to print the option.rect.size() in paint() of my delegate and it prints:
QSize(790, 182)
QSize(790, 182)
QSize(790, 182)
QSize(596, 182)and after this it gives segmentation fault.
-
Strange part is that it asserts in Qt
engine->d_func()
That is where is asserting. I dont understand
-
Can you show a complete stack trace ?
-
I hope this helps:
-
What is Characters_view_delegate ?
-
Characters_view_delegate is my custom delegate for my QListView. I paint my delegate in paint. In the above code ,
List_view_delegate = Characters_view_delegate -
Can you create a minimal example that shows the crash ?