module "QtQuick.Controls" is not installed

After adding the Qt5 Layer, building the SDK for Qt development, building and installing a Qt demo application, I get this runtime error:

./virtualkeyboardqmldemo
VirtualKeyboardInputContextPlugin::create:  "freevirtualkeyboard"
file:///home/root/MainContainer.qml:38:9: Type MainQuickControls unavailable
             MainQuickControls {
             ^
file:///home/root/MainQuickControls.qml:2:1: module "QtQuick.Controls" is not installed
     import QtQuick.Controls 1.2
     ^
file:///home/root/MainQuickControls.qml:3:1: module "QtQuick.Controls.Styles" is not installed
     import QtQuick.Controls.Styles 1.2
     ^
file:///home/root/MainQuickControls.qml:2:1: module "QtQuick.Controls" is not installed
     import QtQuick.Controls 1.2
     ^
file:///home/root/MainQuickControls.qml:3:1: module "QtQuick.Controls.Styles" is not installed
     import QtQuick.Controls.Styles 1.2
     ^
QSGContext::initialize: stencil buffer support missing, expect rendering errors
VirtualKeyboardInputContext::setFocusObject

And indeed, /usr/lib/qt5/qml/QtQuick/ does not contain a directory Controls.

stuff/meta-qt5 is on commit 1ec776771f5f09c97917d3839d8140f9a7668c4a

How can I install QtQuick.Controls?

Assuming you followed the instructions in the article you linked to set IMAGE_INSTALL_append, then you’ll need to add some additional packages to this variable; in particular:

IMAGE_INSTALL_append = " qtquickcontrols"

Thank you. Two questions:

  1. Is there a list of available qt5 packages? Or does ls stuff/meta-qt5/recipes-qt/qt5/ give me that list?
  2. Now I get…

…this error when running my demo app:

VirtualKeyboardInputContextPlugin::create:  "freevirtualkeyboard"
file:///home/root/MainContainer.qml:38:9: Type MainQuickControls unavailable
             MainQuickControls {
             ^
file:///home/root/MainQuickControls.qml:105:21: Cannot assign to non-existent property "style"
                         style: TextFieldFlatStyle {}
                         ^
QSGContext::initialize: stencil buffer support missing, expect rendering errors
VirtualKeyboardInputContext::setFocusObject

I am also new to Qt so I am not sure if I am missing something here. But this answer on stackoverflow to How do I apply the style to a TextField in QML? It seems “style” attribute isn’t available indicates that I need Qt Quick Controls 1 but have Qt Quick Controls 2 installed. Is this correct? If so, how can I obtain Qt Quick Controls 1? I saw qtquick1_git.bb, does it include Qt Quick Controls 1?

@lmoellendorf There is actually a separate package name for Qt Quick Controls2 (qtquickcontrols2). stuff/meta-qt5/recipes-qt/qt5 is where most of the recipes reside, but there may be more or less packages that can be installed. Possibly a good reference is the boot-2qt packagegroup-b2qt-qt5-modules.bb packagegroup recipe. Note that the version of meta-qt5 you are using is still Qt 5.6 whereas the master branch (and the head of the jethro branch of boot2qt) are Qt 5.7. The update to 5.7 includes some additional components which Qt converted from commercial license to the dual open/commercial license such as qtvirtualkeyboard.

There seems to be no qtquickcontrols2 in LinuxImageV2.6. And after changing to ../stuff/meta-qt5/ and doing git checkout repo/master I get this error if I issue bitbake -k angstrom-lxde-image

ERROR: ParseError at /home/oe/oe-core/build/../stuff/meta-qt5/classes/qmake5_base.bbclass:50: Could not inherit file classes/remove-libtool.bbclass

To get my application run I needed to add to conf/local.conf:

IMAGE_INSTALL_append = " qtquickcontrols qtdeclarative"

Would be nice to know how to add Qt 5.7 to the image or to have a list of qt5-modules for the current stable version in LinuxImageV2.6.