QtDeclarative
Uncategorized
Posted by QtDeclarative
 in Uncategorized
 on Monday, December 14, 2009 @ 12:25

We are pleased to announce the release of the Qt Declarative 4.6.0 module for Qt 4.6.0. This allows Qt Declarative with QML support to be built using released Qt 4.6.0 packages.  A new release of the Qt Declarative module will be released for each Qt 4.6 patch release. In order to install this Qt Declarative module you will need to have already installed Qt 4.6.0.

To install download either qt-4.6.0-declarative.zip or qt-4.6.0-declarative.tar.gz, unpack, and follow the instructions in README.html.

The QML API of the Qt Declarative 4.6 module will remain stable, so now is the perfect time to discover the benefits of dynamic user experience creation with QML. Should any changes to the language or APIs occur, please consult QmlChanges.txt in src/declarative.

Qt Declarative is currently being stabilized and productized for inclusion in Qt 4.7. Please take this opportunity to give us feedback on what you think of QML, and tell us of any requirements you think might be important to make it a success!

24 Responses to “Qt Declarative for Qt 4.6.0 released”

» Posted by ZekeComa
 on Monday, December 14, 2009 @ 12:58

I’m really happy with seeing QML being released more so when 4.7.0 gets here. I have a few questions.

1). How will this integrate with existing non-QML projects?
2). Is there plans for Designer integration as well instead of doing it manually?
3). How is the footprint compared to WPF in terms of memory? Because I noticed WPF uses way too much memory for WPF is it the same way with QML?
4). Will QML replace the way we currently do GUI?

I just have to wait til Gentoo updates it’s ebuilds to add support so I can give a try with QML to give feedback but I’m liking what I see in the videos ;).

» Posted by Reed
 on Monday, December 14, 2009 @ 14:27

Can you post a link to a some QML/declarative documentation? Thanks!

» Posted by Henrik Hartz
 on Monday, December 14, 2009 @ 15:36

@ZekeComa:
1) What do you mean by integration? You can expose QGraphicsView-based components to QML, as itself is using QGraphcisView. You can also expose basic QObjects with NOTIFY-able properties where you can interact with signals, slots and properties. See http://qt.nokia.com/doc/qml-snapshot/ for details on this and many more topics
2) We are working on a Qt Creator plugin that will work as a graphical editor that stays in sync with your QML source code
3) Which platform/architecture? With any abstraction there will always be an overhead, but QML also gives us a lot of room to optimize and make it harder to shoot yourself in the foot ;-)
4) That depends very much on your use-case. For differentiated and canvas-based UI’s it’s likely to be a very strong alternative to manually operating on scene elements in C++
Thanks for your feedback!

» Posted by Steve Halihan
 on Monday, December 14, 2009 @ 16:48

Which mailing list will the discussion of declarative take place on?

» Posted by Wiglot
 on Monday, December 14, 2009 @ 16:57

is QML working on S60?

» Posted by bastibense
 on Monday, December 14, 2009 @ 17:02

On my Mac (10.6 with 4.6 release package installed) it fails to compile:

Undefined symbols:
“QTextControl::setIgnoreUnusedNavigationEvents(bool)”, referenced from:
QmlGraphicsTextEditPrivate::init() in qmlgraphicstextedit.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Undefined symbols:
“QTextControl::setIgnoreUnusedNavigationEvents(bool)”, referenced from:
QmlGraphicsTextEditPrivate::init() in qmlgraphicstextedit.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Any ideas?

» Posted by Axel Jaeger
 on Monday, December 14, 2009 @ 18:45

On my mac, qmlviewer does not work because it is linked in a wrong way:

sparkle:qmlviewer axeljaeger$ otool -L ../../bin/qmlviewer.app/Contents/MacOS/qmlviewer
../../bin/qmlviewer.app/Contents/MacOS/qmlviewer:
QtDeclarative.framework/Versions/4/QtDeclarative (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/QtWebKit.framework/Versions/4/QtWebKit (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/phonon.framework/Versions/4/phonon (compatibility version 4.3.0, current version 4.3.1)
/usr/local/Trolltech/Qt-4.6.0/lib/QtSvg.framework/Versions/4/QtSvg (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/QtXml.framework/Versions/4/QtXml (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/QtScript.framework/Versions/4/QtScript (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/QtSql.framework/Versions/4/QtSql (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/QtOpenGL.framework/Versions/4/QtOpenGL (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.6.0, current version 4.6.0)
/usr/local/Trolltech/Qt-4.6.0/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.6.0, current version 4.6.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 103.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.0)
sparkle:qmlviewer axeljaeger$

You see that the declarative framework is not linked with its full path although it is installed.

This was installed from source packages: Both Qt and Qt declarative where compiled by myself.

» Posted by scorp1us
 on Monday, December 14, 2009 @ 19:36

I tried to build QMLViewer, but got:

c:/qt/2009.05/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe:
cannot find -lQtDeclaratived

» Posted by scorp1us
 on Monday, December 14, 2009 @ 19:40

Update: same thing for release…

» Posted by SABROG
 on Monday, December 14, 2009 @ 20:30

In WindowsXP with MinGW i can’t compile qmlviewer becouse declarative.pro file don’t generate .prl files, so i manually add this line in end of file:

*-g++*: CONFIG += create_prl

mingw32-make install - install only debug version of QtDeclarative

With qmlviewer i open calculator.qml and just exit from viewer and then get crash.

» Posted by SABROG
 on Monday, December 14, 2009 @ 20:34

Also i want say, what README don’t have instruction how to compile QtDeclarative with MinGW and QtCreator still say:
“Starting …
The process could not be started!”, when i try working with QML Projects.

» Posted by scorp1us
 on Monday, December 14, 2009 @ 21:19

Well for mingw, i have to change the .a files to be without the ‘4′. It seems they were generated as libQtDeclarative[d]4.a, but attempted to be linked as libQtDeclarative[d].a

I do have it up and running now.

» Posted by Henrik Hartz
 on Tuesday, December 15, 2009 @ 06:37

@Bastibense: see the README.html file, you need to copy some headers into the compiled framework
@Axel Jaeger: That reference does indeed look wrong. Quick workaround is to change the reference in the library;

install_name_tool -change QtDeclarative.framework/Versions/4/QtDeclarative /usr/local/Trolltech/Qt-4.6.0/lib/QtDeclarative.framework/Versions/4/QtDeclarative

» Posted by Aamer
 on Tuesday, December 15, 2009 @ 07:33

I am trying to build on windows but getting errors.. few last lines are as follows -
c:\qt\qt-4.6.0-declarative\src\declarative\util\qmlfontloader_p.h(78) : see previous definition of ’status’
util\qmlfontloader.cpp(191) : warning C4273: ‘QmlFontLoader::replyFinished’ : inconsistent dll linkage
c:\qt\qt-4.6.0-declarative\src\declarative\util\qmlfontloader_p.h(81) :
see previous definition of ‘replyFinished’
Generating Code…
NMAKE : fatal error U1077: ‘”C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.EXE”‘ : return code ‘0×2′
Stop.
NMAKE : fatal error U1077: ‘”C:\Program Files\Microsoft Visual Studio 8\VC\BIN\n
make.exe”‘ : return code ‘0×2′
Stop.
C:\Qt\qt-4.6.0-declarative\src\declarative>

I had my path set to C:\Qt\4.6.0\bin where I had built 4.6.0-opensource with Visual Studio 2005.
I also set the following -
set QTDIR=C:\Qt\4.6.0
set PATH=C:\Qt\4.6.0\bin;%PATH%
set QMAKESPEC=win32-msvc2005

Can you point any mistake I am making ? I had qtcreator-pulse-qml installed, but I dont think it should be problem. I uninstalled it and tried again, but in vain :-(

» Posted by bastibense
 on Tuesday, December 15, 2009 @ 10:12

@Hendrik Hartz: Unfortunately it’s qt-declarative that fails to compile. I don’t get to the point where I have to copy the compiled framework into my existing QTDIR.

Interestingly it seems to compile with a manually compiled Qt, but that is obviously installed in a different place (/usr/local/…). What might be the differences between Qt 4.6 installed from a package on OS X and compiling it myself?

» Posted by Kelytha
 on Tuesday, December 15, 2009 @ 11:22

I have successfully compiled QtDeclarative with MinGW from the Qt SDK… works like a charm, except for the above mentioned error in linking qmlviewer.exe. Copying and renaming the library files solved it.

However there is another problem about which I’d like to ask. When I try to access data from the internet from a QML application it’s whole window freezes during the transfer. If a site takes a little longer to load, Windows even says that the application has become unresponsive and offers to close it. Is this a known problem or something I should report in the bug tracker?

» Posted by Martin Ra
 on Tuesday, December 15, 2009 @ 14:05

I don’t get this compiled and the README is really very useless. Win7 64Bit.
Why are there no readily built binaries? :(
Anyone?

» Posted by David
 on Wednesday, December 16, 2009 @ 01:55

It does compile fine in Debian, but I get:
Cannot mix incompatible Qt libraries
Aborted

I have the 4.6.0 package from Debian unstable (the only Qt installation).

» Posted by Thiago Macieira
 on Wednesday, December 16, 2009 @ 09:05

QtDeclarative may not work with distribution-modified versions of Qt. You should use a pristine version.

» Posted by bastibense
 on Friday, December 18, 2009 @ 14:15

I tried compiling against a fresh Git checkout of Qt 4.6(.1) and — declarative won’t compile, still. http://pastie.org/748688

» Posted by steve halper
 on Friday, December 18, 2009 @ 14:25

I had RC 4.6 installed on an OSX 10.5.8 intel machine using the installer.
It runs well.
I then downloaded Declarative and tried to install it. and got the same exact compile error as @bastibense.
So then I downloaded the 4.6 rc 1 source and installed that.
I then tried to compile Declarative and got the same error again.

I have never been able to get declarative to compile in even the previews.

If Declarative won’t even installed on basic basic Qt installs like I had…..

I can only come to the conclusion that qt / nokia does , or at least the Qt declartive guy there does NO testing on OS X.

I mean if Declarative won’t compile for people that used the installer… and it won’t compile for people that install the source….

who on OSX does it work for?

and where are we supposed to post for support? which mailing list?

I would really like to start to use and test Declartive as I am impressed by the technology, but if Qt wants bug reports from the OSX platform, maybe they should start to make sure everything that gets posted to labs. works with the Qt that is installed with the OS X installer.

This has been highly frustrating to say the least.

» Posted by johnny
 on Sunday, December 20, 2009 @ 00:20

Great job guys!
Compiled from the first time on Windows + MinGW (with a minor glitch, I had to rename libQtDeclarative4.a to libQtDeclarative.a)

» Posted by espenr
 on Thursday, December 24, 2009 @ 00:38

To make it work with the Qt for Windows SDK using MinGW do:

- unzip it
- open Qt command prompt
- cd to src\declarative
- qmake
- mingw32-make.exe
- mingw32-make.exe install
- xcopy /E ..\..\include\QtDeclarative %QTDIR%\include\QtDeclarative (yes to all)
- cd to %QTDIR%\lib
- copy libQtDeclaratived4.a libQtDeclaratived.a

then to build qmlviewer:
- cd tools\qmlviewer
- qmake
- mingw32-make.exe
- mingw32-make.exe install

worked for me..

Happy Christmas and and Happy Holiday Hacking ;D

» Posted by Gary_W
 on Thursday, December 24, 2009 @ 14:03

if I put some Chinese charactor in *.qml file and run the project,the Chinese charactor will not display normally,How to deal with it?Thanks.



© 2008 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners.