What configuration is needed for QML to work?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What configuration is needed for QML to work?

3,830 Views
Matt_ng9
Contributor III

Does anyone know how I should configure Qt so that QML will work?  I am using an i.MX28 with no X11 support and no hardware accelerated graphics.

Looking through the list of configurable components, I am unsure if webkit, javascript-jit, or script will make QML work (or maybe other features are necessary).  And I have been unable to find anything that specifically says what to configure.  I am trying to keep the Qt library as small as possible so I do not want to install features that are unnecessary for my platform.

Also, is it a mistake to try to use QML without hardware accelerated graphics?

Thank you!

- Matt

Tags (2)
0 Kudos
10 Replies

1,467 Views
DonaldR_PooleJr
Contributor I

Hello Krishna,

You actually don't need the qmlviewer on your target device.  You can simple cross-compile your QML app linking against ARM declarative module and execute the QML app just like any other executable.  If you really need the QML Viewer, then you well need to cross-compile the Qt4 or Qt5 SDK for the i.MX53 QSB.  I don't have much experience with cross-compiling the SDK, but I know it can and has been done (e.g. the Gumstix community has recipes for this).

 

Regards,

Donald

0 Kudos

1,467 Views
KrishnaPavan
Contributor II

Thank You.

But, If we want to build embedded_linux, then we need to use qt-opensource-everywhere right?

 +  -declarative ....... Build the declarative module. is what I have in my ./configure -help [ Thanks for the link @ Pierre].

But I could not get qmlviewer in my /bin in the Qt-Target-Directory.

Please tell me, How to get qmlviewer?

0 Kudos

1,467 Views
PierreVorhagen
Contributor I

Krishna Pavan; please note that my comments are about Qt 5. In Qt 5, you configure/build each module separately.

However, if you're planning on building Qt4.8, take a look here for the right configure options: http://qt-project.org/doc/qt-4.8/configure-options.html


Regards,
Pierre

0 Kudos

1,467 Views
KrishnaPavan
Contributor II

Hi,

A post by Pierre Vorraghen & Donald R Poole, Jr, suggests, that we need to include qtdeclarative, qtbase, qtxmlpatterns, qtjsbackend, If I need to use the qml based designs from the qml sources made & ported to the target.

Is it that I should use, -qt-declarative -qt-base -qt-xmlpatterns -qt-jsbackend in ./configure arguments along with other conf. parameters.

Please give me the proper pattern, as the above pattern[my trial] doesn't help me.

0 Kudos

1,467 Views
DonaldR_PooleJr
Contributor I

Yes, enabling Qt Declarative (-delcarative configure flag) in the configuration will build the declarative library and allow you to run your QML application on the target system.

0 Kudos

1,467 Views
KrishnaPavan
Contributor II

Hi All,

I have got a hello world program, and to run it on my PC, I have used qmlviewer.

But, that application is not on my target rootfs.

Then, Is it that "Enabling Qt Declarative, Will get me that application, so that I can run QML on my Target?  "

Please Suggest!

0 Kudos

1,467 Views
hbucknell
Contributor I

Hi Matt,

We are using declarative controls in Qt 4.7.1 on a imx233. It can get a bit choppy if you try to do a lot of animation control on the screen, i.e. transitions and wipes etc. But other than that its fine. Looks very good.

We are using QML, XML and various image formats

If it's any help the configure script we use is attached, FYI we are building statically which you may not want! There are a lot of unwritten dependencies in the Qt build that make it a pain to reduce the size of the build on a fine-grained basis.

Good luck.

Humphrey

0 Kudos

1,467 Views
Matt_ng9
Contributor III

Thanks for the help Pierre and Donald!

Sorry I forgot to mention, but I am dealing with 4.7.3, and the i.MX28 has no hardware accelerated graphics (it has alpha blending layers but no Qt support for that).  So I am stuck with the framebuffer.

I built my Qt library with -no-declarative flag, so I will try with -declarative first, then try adding xml and js if it still does not work.

- Matt

0 Kudos

1,467 Views
DonaldR_PooleJr
Contributor I

Matt,

Assuming you are building Qt-4.7+, by default the configure script will configure Qt with QML (as a release and debug library).  Note that the nomenclature changes from QML to Declarative within the context of Qt configuration.  So that's probably why you missed it the first time.  You can enable QML (delcarative) with the -declarative option or disable it with -no-declarative option.

As for being a mistake to use QML without hardware accelerated graphics, I can't give you a confident answer.  Although, enabling hardware acceleration will definitely help, so I would enable it if you can.

0 Kudos

1,467 Views
PierreVorhagen
Contributor I

Hi Matt,

In Qt5, for QML to work, I think qtbase, qtxmlpatterns, qtjsbackend and qtdeclarative is all you need. (You can build them in that order.) Maybe qtscript is needed too, but I don't think so...


You will have better and more fluent graphics with hardware acceleration, but the best thing is simply to test it with some example qml apps. If you're looking at ditching X11 and any hardware acceleration, I'd stick with QWS to begin with though. (Or try out a framebuffer plugin, maybe... but that will no longer be supported I think.)


Regards,

Pierre

0 Kudos