[Interest] passing QWindow as parameter to a Q_INVOKABLE method
Bo Thorsen
bo at vikingsoft.eu
Mon Sep 1 08:06:48 CEST 2014
Den 30-08-2014 23:57, Thomas Sevaldrud skrev:
> Argh, sent it before I was finished :-)
>
> Anyway, that's about the essence of it. I have also tried with
>
> initialize(this)
>
> in the onCompleted() callback with no luck.
>
> The initialize() method is defined like this:
>
> Q_INVOKABLE void initialize(const QWindow &win);
>
>
> If I remove the parameter, the method is called correctly, but with the
> QWindow parameter, it never gets called, and I don't get any error
> message or warnings.
No warnings sound bad. But what happens is otherwise correct.
Change the method to take a QVariant and downcast in the method instead.
Bo Thorsen,
Director, Viking Software.
--
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu
More information about the Interest
mailing list