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 <[email protected]>
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);
>
>
>     }
>
> }
>
>
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to