Quantcast
Channel: Active questions tagged qtquick2 - Stack Overflow
Viewing all articles
Browse latest Browse all 107

Missing types in QtQml even if I have imported QtQuick in Qt5.15.11 for Android

$
0
0

I have an App with the following configurations.

  1. Win32 app with Qt5.15.2.
  2. Android App(API 29) with Qt5.12.6.

Now I am trying to upgrade Qt version to Qt5.15.11 for the Android App.

For most of my QML files, I have:

import QtQuick 2.12import MyPersonalModule 1.0

I have managed to build Qt libs for Android API 29 with r21e NDK and I am trying to integrated it with my Android app.Now my Android app can launch, can read native libs, can find my QML file resources, but cannot start because all types in QtQML are missing, such as QtObject, Connections.

In this question, a phrase is mentioned:

Most clients will never need to use the QtQml import, as all of the types are also provided by the QtQuick namespace which may be imported as follows:

I can find this phrase in the document of "Qt Qml QML Types".However, this phrase only exists for Qt6.8 and Qt6.2, but not in Qt5.15.

According to documents of QtOject/Connections (5.15), it is necessary to import QtQml 2.15.However, it is apparently not true for Qt5.15.2 Win32 because my Win32 app is running well.So, the necessity of importing QtQml is questionable.

I have hundreds of QML files, I don't want to add "import QtQml 2.15" for all of them.How to fix this?I doubt that it is necessary to import it. I suspect that I did something wrong during building Qt libs or Android app.If it is truly necessary, is there a way reduce the effort? Is it possible to implicitly import QtQml for all of my QML files?


Viewing all articles
Browse latest Browse all 107

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>