1

I created an application with Qt5.9.3 on iOS 12 and in a qml file, I use a SwipeView so I need:

import QtQuick 2.7 // also test 2.9
import QtQuick.Controls 2.0 // also test 2.1, 2.2

But I keep having the error:

module "QtQuick.Controls" version 2.0 is not installed

In my cmake file, I added the specific modules Quick and QuickControls2, the lib are installed with Qt5.9.3, so I have:

set( MY_QT_MODULES Core Gui Qml Quick QuickControls2 all/modules/I/need)
find_package( Qt5 PATHS my/path/to/Qt COMPONENTS $(MY_QT_MODULES) )

What is missing in that? Thanks.

SteveTJS
  • 635
  • 17
  • 32

1 Answers1

0

I had to add

Q_IMPORT_PLUGIN(QtQuickControls2Plugin)

in the main.cpp.

SteveTJS
  • 635
  • 17
  • 32