Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 2 Support (Qt 5) › ReferenceError: NativeObjectUtils is not defined

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24155

    Zongyao

    I have recently updated Felgo to 3.8.0 in order to use the native code components. The update was successful and I can see the native code components documentation in the Qt creator. However, when I try to run the dark mode example in https://felgo.com/doc/felgo-native-code-components/ ,  the log tells me there is no NativeObjectUtils available:

    file:LBS/qml/Main.qml:29: ReferenceError: NativeObjectUtils is not defined

    I am really excited about the native code components. Are there any migration steps I am missing? What do I need to do to make the native code components work?

    #24156

    Zongyao

    I was using the MSVC compiler on the desktop when the above problem occurred.  When I switched back to MinGW compiler, the native code components became available.

    However, the WebView only works with the MSVC compiler, and the native code components only work with the MinGW compiler. Is there any way I can use both of them at the same time?

    #24158

    Zongyao

    It turned out that the native code components didn’t work on the MinGW compiler either. The code:

    NativeObjectUtils

    is highlighted in the MinGW compiler, but when I ran the code I got the same error:

    file:LBS/qml/Main.qml:29: ReferenceError: NativeObjectUtils is not defined

    Other 3.8.0 updates like fileUtils.readFileBytes() didn’t work either. I also find that qt 5.15.2 is not available in the Felgo MaintenanceTool Add/Remove Component.

    #24159

    Zongyao

    I solved the problem by updating the Felgo DevApp on my testing phone. There is nothing with the 3.8.0 update, I just forgot to update the Felgo DevApp on my phone synchronously.

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded