To solve the problem you should declare a
public function which you call from the outside. For that you need a valid pointer to your form class instance.
Another issue is, that the call must be in the main thread of your app. Only if it is not in the main thread take a look at
this answers at stackoverflow.