[Interest] Crash when signal fires

Ben Haller bhaller at mac.com
Wed Apr 22 17:34:01 CEST 2020


> On Apr 22, 2020, at 11:17 AM, Thiago Macieira <thiago.macieira at intel.com> wrote:
> 
> On Tuesday, 21 April 2020 16:44:19 PDT Ben Haller via Interest wrote:
>>    connect(qApp, &QApplication::focusChanged, [this]() {
>> updateUIEnabling(); });
> 
> Your object probably outlived QApplication.

  Other way around, right?

> Add a third argument of "this" to the connect() call.

  Yes, Giuseppe D’Angelo set me on the right path on this, and I’ve just gone through all the connect() calls in my app and made them all safe.  Thanks!

Cheers,
-B.

Benjamin C. Haller
Messer Lab
Cornell University




More information about the Interest mailing list