[Interest] passing QWindow as parameter to a Q_INVOKABLE method

Thomas Sevaldrud thomas at silentwings.no
Sat Aug 30 23:57:22 CEST 2014


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.

Cheers,
Thomas


On Sat, Aug 30, 2014 at 11:52 PM, Thomas Sevaldrud <thomas at silentwings.no>
wrote:

> Hi,
>
> I'm trying to pass a reference to the main application window to an
> invokable method in Quick. Something like this:
>
> ApplicationWindow {
>
>     id: mainWindow
>
>     visible: true
>
>     width: 1280
>
>     height: 720
>
>
>     ....
>
> }
>
>
>     Component.onCompleted: {
>
> initialize(mainWindow);
>
>
>     }
>
> }
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140830/524e2fe0/attachment.html>


More information about the Interest mailing list