Hi Tim,
2015-02-15 0:41 GMT+01:00 Tim E. Real <[email protected]>:
> <..>
>
> Weird, how do I get Qt to close the menu, /before/ it executes code
> > resulting from clicking /away/ from the menu?
>
> Sorry wrong question, should be how do we delay the destruction when
> delete w;
> is called.
> Then I remembered: From Qt help:
>
> QObject::~QObject()
> "Warning: Deleting a QObject while pending events are waiting to be
> delivered
> can cause a crash. You must not delete the QObject directly if it exists
> in a
> different thread than the one currently executing. Use deleteLater()
> instead,
> which will cause the event loop to delete the object after all pending
> events
> have been delivered to it."
>
> void QObject::deleteLater() [slot]
> Schedules this object for deletion.
> "The object will be deleted when control returns to the event loop...."
>
> I tried deleteLater() and it seems to work.
> No crashes and my printf test markers are OK.
>
I guess we can shalk this up as one of those where you just need to explain
to someone else and it becomes apparent? :)
Deep into arduino stuff over here. So many things to do...
Regards,
Robert
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Lmuse-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmuse-developer