[Interest] Double free in QItemDelegate editor

Kyle Edwards kyle.edwards at kitware.com
Thu Sep 3 22:51:54 CEST 2020


Hello,

My project (CMake GUI) has a class which extends QItemDelegate and 
overrides QItemDelegate::createEditor(). However, the editor that gets 
returned by this method gets double-freed, and I'm not sure exactly why. 
(I did notice that QItemDelegate::destroyEditor() calls the editor's 
QObject::deleteLater() by default - does the editor already get deleted 
when its parent gets deleted?)

What's interesting is that this issue only happens when using the Qt 
binaries from https://qt.io/download. When I use the system binaries 
from APT (which I believe ultimately delegate to GTK), everything works 
fine.

Any ideas on what might be wrong?

Kyle



More information about the Interest mailing list