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.
Also, is it a mistake to try to use QML without hardware accelerated graphics?
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).
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?
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
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.
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.
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? "
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.
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.
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.
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.)