[Interest] Calling QT Class method from pthread thread

Konstantin Shegunov kshegunov at gmail.com
Wed Oct 4 17:41:55 CEST 2017


On Wed, Oct 4, 2017 at 6:39 PM, Gonzalo Aguilar Delgado <
gaguilar at aguilardelgado.com> wrote:

> Yes it is. Because the code of the function starts to execute. In the
> example the processMessage. Until the operation stops on emit and the
> program crash.
>
emit requires you to have a valid `this` pointer, nothing before that,
unless I have missed something, does - you're using only local variables.
Most (if not all) compilers will still allow you to call methods with
invalid objects up to the point where the object (i.e. `this`) is actually
referenced.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171004/456d7ccd/attachment.html>


More information about the Interest mailing list