[Qt-creator] import QtQuick.Extras error
Eike.Ziller at theqtcompany.com
Thu Nov 12 11:16:21 CET 2015
> On Nov 11, 2015, at 4:41 PM, Alvaro Martinez Tovar <alvaromartineztovar at yahoo.es> wrote:
> Hello Kai,
> Thank you very much for your feedback! I am in a hurry to have something running before Nov 25th and I appreciate your collaboration very much.
> I have tried to investigate a little bit and these are my thoughts so far:
> at the host (Ubuntu 14.04) I have the following tree:
the contents of this folder are for use of the Qt Creator application only. If you build & run your application, even from Qt Creator, this folder is irrelevant. For your application you’ll have to look at the Qt installation that you use for your application.
> ├── QtQuick
> │ ├── Controls
> │ ├── Extras
> │ │ ├── designer
> │ │ ├── libqtquickextrasplugin.so
> │ │ ├── plugins.qmltypes
> │ │ └── qmldir
> so that QtQuick/Extras folder exists as you suggest. The application runs perfectly.
> however, at my yocto distribution, I don't have any Extras directory under
> so I have tried to directly copy the Extras file from the host to the target.
> It seems that when executing in the target, the application looks there for the module, since the error now is a little bit different:
> plugin cannot be loaded for module "QtQuick.Extras": '/usr/lib/qt5/qml/QtQuick/Extras/libqtquickextrasplugin.so' is an invalid ELF object (wrong cpu architecture)
> I guess that if I could create a proper libqtquickextrasplugin.so file for my ARM architecture (i.MX6 Freescale), the problem could be solved.
> Do you now how could I do it?
> The installed sdk is working properly, since I can execute any kind of application in my target. Can I use it somehow to generate the needed plugin?
Afaik it is part of the Qt Quick Controls. If your target environment doesn’t provide it you need to build and install it into your target Qt installation.
You can get sources e.g. through the Qt installer (Qt > Qt version > Source Components)
> Regarding building the application statically, I agree with your suggestion and I don't think that this is what we need.
> Thank you very much for your help.
> Best regards,
> Alvaro Martinez
> De: Koehne Kai <Kai.Koehne at theqtcompany.com>
> Para: Alvaro Martinez Tovar <alvaromartineztovar at yahoo.es>; "qt-creator at qt-project.org" <qt-creator at qt-project.org>
> Enviado: Miércoles 11 de noviembre de 2015 15:46
> Asunto: RE: [Qt-creator] (no subject)
> > -----Original Message-----
> > From: Qt-creator [mailto:qt-creator-bounces at qt-project.org] On Behalf Of
> > Alvaro Martinez Tovar
> > Sent: Wednesday, November 11, 2015 1:16 PM
> > To: qt-creator at qt-project.org
> > Subject: [Qt-creator] (no subject)
> > Hi,
> > I am quite new to Qt.
> Welcome :)
> > I have executed the example application dashboard under
> > Qt5.5.0 in Ubuntu and works perfectly! However, when I cross-compile it and try
> > to execute it in the embedded target (based on a i.MX6UL), I get the following
> > error:
> > module "QtQuick.Extras" is not installed
> First of all: this is the wrong mailing list, since your problem is not really with Qt Creator. qt-interest would fit better ... Also, give your e-mails please a subject :)
> Anyway, what happens for you is that the Qt Quick 2 import "QtQuick.Extras" is not found. The plugin should be located in $[ QT_INSTALL_QML]/ QtQuick\Extras
> > do I have to include something else to pro file in order to include this module?
> No, there shouldn't be any extra steps required, provided that the Qt on your embedded device was properly set up.
> Try to set the QT_IMPORT_TRACE and QT_DEBUG_PLUGINS environment variables to get some more information where it searches the plugins, and maybe why it cannot load it.
> > What I have by now is the following:
> > TEMPLATE = app
> > TARGET = dashboard
> > INCLUDEPATH += .
> > QT += gui qml quick widgets serialport sql target.path = /home/root INSTALLS +=
> > target SOURCES += \
> > main.cpp
> > RESOURCES += \
> > dashboard.qrc
> > OTHER_FILES += \
> > qml/dashboard.qml \
> > qml/DashboardGaugeStyle.qml \
> > qml/IconGaugeStyle.qml \
> > qml/TachometerStyle.qml \
> > qml/TurnIndicator.qml \
> > qml/ValueSource.qml
> > what is really strange for me is that it runs perfectly in Ubuntu, but this error
> > appears when deploying to target.
> > I have tested some other application and they run correctly in both platforms.
> > Could you give me any hint to solve it?
> > How could I compile everything together into one executable in order not to
> > depend on libraries? Is it possible?
> You can indeed build your application statically, but this requires a custom build of Qt, and might be not the best on an embedded platform if you've other Qt processes too.
> A good start to read about this is
> Qt-creator mailing list
> Qt-creator at qt-project.org
Eike Ziller, Senior Software Engineer - The Qt Company GmbH
The Qt Company GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
More information about the Qt-creator