[Interest] Persistence of editor for openPersistentEditor
Reinhardt Behm
rbehm at hushmail.com
Wed Jun 6 03:11:44 CEST 2018
On Tuesday 05 June 2018 06:42:28 william.crocker at analog.com wrote:
> On 06/04/2018 05:08 PM, Patrick Stinson wrote:
> > Hello!
> >
> > I am writing a unit test for an item view and need to get . The code in
> > *qabstractitemview_p.h* “releases” an editor created by a delegate by
> > calling *QObject::deleteLater()* on it. However, in the following code
> > the first editor is not deleted and so the second call to findChild still
> > returns it instead of the second editor:
> >
> > view->openPersistentEditor(indexA)
> > editorA = view->findChild<QComboBox *cb>()
> > view->closePersistentEditor(indexA)
>
> Here I typically qApp->sync and qApp->processEvents (or so.)
> Which provide the "later" context.
Doesn't this defeat the purpose of deleteLater()? It is normally used to
prevent destruction of an object from inside is own signal.
--
Best Regards
Reinhardt Behm
More information about the Interest
mailing list