<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Qt Labs Blog</title>
	<atom:link href="http://labs.qt.nokia.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.qt.nokia.com</link>
	<description>the ramblings of engineers</description>
	<lastBuildDate>Wed, 09 May 2012 14:02:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Qt Creator 2.5.0 released</title>
		<link>http://labs.qt.nokia.com/2012/05/09/qt-creator-2-5-0-released/</link>
		<comments>http://labs.qt.nokia.com/2012/05/09/qt-creator-2-5-0-released/#comments</comments>
		<pubDate>Wed, 09 May 2012 14:02:49 +0000</pubDate>
		<dc:creator>Eike Ziller</dc:creator>
				<category><![CDATA[Qt]]></category>
		<category><![CDATA[QtCreator]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8405</guid>
		<description><![CDATA[The Qt Creator 2.5.0 final has been released! There are lots of new features and improvements in this release, I&#8217;ll highlight a few here, some others are probably already mentioned in our beta blog post, and you&#8217;ll find a more complete list in our changes file. So, new features and improvements include but are not [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>The Qt Creator 2.5.0 final has been released! There are lots of new features and improvements in this release, I&#8217;ll highlight a few here, some others are probably already mentioned in our <a href="http://labs.qt.nokia.com/2012/03/15/qt-creator-2-5-beta/">beta blog post</a>, and you&#8217;ll find a more complete list in our <a href="http://qt.gitorious.org/qt-creator/qt-creator/blobs/2.5/dist/changes-2.5.0">changes file</a>.</p>
<p>So, new features and improvements include but are not limited to:</p>
<p><a href="http://labs.qt.nokia.com/wp-content/uploads/2012/03/todoscreenshot3.png"><img class="size-full wp-image-8215 alignright" title="TODO plugin" src="http://labs.qt.nokia.com/wp-content/uploads/2012/03/todoscreenshot3.png" alt="" width="533" height="344" /></a></p>
<ul>
<li>You can repeat a recent search with the same parameters with a simple click on &#8220;Search Again&#8221;</li>
<li>&#8220;Execute&#8221; Locator filter lets you run arbitrary commands in a shell from Qt Creator (&#8220;! &lt;some command&gt;&#8221;) (thanks to Yuchen Deng!)</li>
<li>Experimental plugin that shows &#8220;TODO&#8221; items from your sources (thanks to Dmitry Savchenko and Vasiliy Sorokin!)</li>
<li>Experimental plugin for autotools based projects (thanks to Patricia Santana Cruz and Openismus GmbH!)</li>
<li>Mac OS X Lion users will we happy to know that QTCREATORBUG-6222 which prevented adding some Qt Versions has finally been fixed</li>
<li>A very basic version of a C++ refactoring action that adds an #include for an unknown identifier has been added (move cursor on identifier, press Alt+Return (Option+Return on Mac OS X))</li>
<li>A very basic version of a C++ &#8220;extract method&#8221; refactoring action</li>
<li>Improved support of C++11 (nullptr, constexpr, static_assert, noexcept, inline namespaces, auto, lambdas)</li>
<li>Rearrange C++ method arguments (thanks to Bojan Petrovic!)</li>
<li>New hints and warnings for QML code, including an option to prevent them for specific lines (with a special comment)</li>
</ul>
<p><a href="http://labs.qt.nokia.com/wp-content/uploads/2012/05/rearrangemethodarguments.png"><img class="size-full wp-image-8411 alignnone" style="border: 1px solid black;" title="Rearrange method arguments" src="http://labs.qt.nokia.com/wp-content/uploads/2012/05/rearrangemethodarguments.png" alt="" width="682" height="68" /></a></p>
<p><strong>Note for Windows MinGW Users</strong></p>
<p>We decided to remove the custom MinGW distribution and MinGW gdb from our Qt Creator-only Windows binary distribution package. The original reasons to include it there (it was the predecessor of the Qt SDK) are since a while now filled by the Qt SDK. Also, updating the shipped version is a legal hassle as long as the binaries are provided through Nokia, but we also don&#8217;t want to ship stone age versions. We are working on build infrastructure for the Qt Project itself though, that we ultimately want to use to build Qt Creator packages, snapshots, and more. Currently, on http://builds.qt-project.org, you find Qt Creator snapshots for Linux and Windows, and also a Python enabled MinGW gdb (that reportedly doesn&#8217;t work on Windows XP). It&#8217;s still possible to install MinGW and gdb separately and register them in Qt Creator. We are <strong>not</strong> removing the support for it from Qt Creator.</p>
<p>Previously shipped MinGW: <a href="ftp://ftp.qt.nokia.com/misc/MinGW-gcc440_1.zip">ftp://ftp.qt.nokia.com/misc/MinGW-gcc440_1.zip</a><br />
Previously shipped MinGW gdb: <a href="ftp://ftp.qt.nokia.com/misc/gdb/7.2/qtcreator-gdb-7.2-mingw-x86.zip">ftp://ftp.qt.nokia.com/misc/gdb/7.2/qtcreator-gdb-7.2-mingw-x86.zip</a></p>
<p>Up to date MinGW: <a href="http://www.mingw.org">http://www.mingw.org</a> (we might provide a compact version like the one in the old installer later)<br />
Python enabled MinGW gdb 7.4: <a href="http://builds.qt-project.org/job/gdb-windows/">http://builds.qt-project.org/job/gdb-windows/</a> (compiled on Windows 7, doesn&#8217;t work on Windows XP)</p>
<p><strong>Thanks to All Contributors</strong></p>
<p>Too many to include them all here, please scroll to the end of our <a href="http://qt.gitorious.org/qt-creator/qt-creator/blobs/2.5/dist/changes-2.5.0">changes file</a>!</p>
<p><strong>Download</strong></p>
<p>See our <a href="http://qt-project.org/wiki/Qt_Creator_Releases">Release Page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/05/09/qt-creator-2-5-0-released/feed/</wfw:commentRss>
		<slash:comments>59</slash:comments>
		</item>
		<item>
		<title>Qt Creator 2.5 RC released</title>
		<link>http://labs.qt.nokia.com/2012/04/23/qt-creator-2-5-rc-released/</link>
		<comments>http://labs.qt.nokia.com/2012/04/23/qt-creator-2-5-rc-released/#comments</comments>
		<pubDate>Mon, 23 Apr 2012 13:00:29 +0000</pubDate>
		<dc:creator>Eike Ziller</dc:creator>
				<category><![CDATA[Qt]]></category>
		<category><![CDATA[QtCreator]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8361</guid>
		<description><![CDATA[We are happy to announce the Qt Creator 2.5 release candidate today. Since the beta release we did a lot of bug fixing, including some crashes and some regressions in the C++ code model handling. Thanks to all who contributed to these 180+ fixes. And special thanks this time go to Leena, for all the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>We are happy to announce the Qt Creator 2.5 release candidate today. Since the <a href="http://labs.qt.nokia.com/2012/03/15/qt-creator-2-5-beta/">beta release</a> we did a lot of bug fixing, including some crashes and some regressions in the C++ code model handling. Thanks to all who contributed to these 180+ fixes. And special thanks this time go to Leena, for all the effort she put into updating our documentation and screenshots again!</p>
<p>Featurewise I refer you to the <a href="http://labs.qt.nokia.com/2012/03/15/qt-creator-2-5-beta/">beta release blog post</a>. One thing we didn&#8217;t mention there though is another new (experimental) plugin for direct support of <a href="http://en.wikipedia.org/wiki/GNU_build_system">autotools</a> projects. If you work with autotools based projects, you might want to check this out instead of using the generic &#8220;Import existing project&#8221;. Just enable Help &gt; About Plugins &gt; Build Systems &gt; AutotoolsProjectManager, restart Qt Creator, and open a Makefile.am. Many thanks to Patricia Santana Cruz and <a href="http://www.openismus.com/">Openismus GmbH</a> for contributing this plugin.</p>
<p><a href="http://qt-project.org/wiki/Qt_Creator_Releases">Download page</a></p>
<p><a href="https://qt.gitorious.org/qt-creator/qt-creator/blobs/2.5/dist/changes-2.5.0">Changes file</a></p>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/04/23/qt-creator-2-5-rc-released/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Qt 5, C++ and Qt Widgets</title>
		<link>http://labs.qt.nokia.com/2012/04/18/qt-5-c-and-qt-widgets/</link>
		<comments>http://labs.qt.nokia.com/2012/04/18/qt-5-c-and-qt-widgets/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 09:52:56 +0000</pubDate>
		<dc:creator>Lars Knoll</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Contributors]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8321</guid>
		<description><![CDATA[We have seen the many questions and the concerns raised about our commitment to C++ and QWidget in Qt 5. I thought now would be a good time to address some of these concerns in this post. The post on the Qt 5 alpha was focused on the new things we enable and add with [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>We have seen the many questions and the concerns raised about our commitment to C++ and QWidget in Qt 5. I thought now would be a good time to address some of these concerns in this post. </p>
<p>The post on the Qt 5  alpha was focused on the new things we <em>enable and add</em> with Qt 5.  </p>
<p>Let me just state it very clearly here:</p>
<h2>QWidget and all derived classes are a core part of Qt 5 on the Desktop.</h2>
<p>You can continue writing your application in exactly the same way as you have been doing with Qt 4.x.</p>
<p>We have promised to try to keep as much source compatibility with Qt 4.x as we can. And of course this includes QWidget and your application written in C++. This is not going away. Yes, the Qt Widgets module we have in Qt 5 is right now marked as &#8216;done&#8217;, which means we don&#8217;t have anybody actively working on new features for the module at this point in time. But this can change any day if someone has some interest or need to do more active development in this area.</p>
<p>What we did with Qt 5 is to <em>add</em> a new way to do applications with QML. I personally believe that over time we will see more and more apps being written that way, as I believe it is the better solution in the long term.</p>
<p>New user interfaces such as the Windows 8 Metro UI are not things we could simply add to our existing QWidget infrastructure. Adding support for the kind of animations used in these user interfaces is extremely difficult using QWidgets, as they were designed for the mostly static user interfaces that predominated until a couple of years ago. </p>
<p>The fluid animated user interfaces that are already there on Devices such as smartphones and tablets are now also starting to appear also on desktops. And they are simply not implementable using the QWidget infrastructure.</p>
<p>This implies that we needed to do something new here. And QML/Qt Quick was the answer we came up with to solve this problem. That&#8217;s why we&#8217;re investing in that area.</p>
<p>Our experience with QML over the last years has shown us that it is the superior technology for building UIs in the long term. If you want, you can simply use it as a more powerful replacement to .ui files. But you can also write some application logic in there using Javascript if you want.</p>
<p>It really is up to everybody what they make out of the options being given by Qt 5, and how they best like to use them.</p>
<h2>C++ is and will stay our main programming language.</h2>
<p>We have done significant work for Qt 5 adding many new C++ APIs. We have added support for C++11 in many places. And we&#8217;ll continue to do so, because larger scale applications written with Qt will be mostly written in C++ for a long time to come. And there&#8217;s nothing bad about this.</p>
<p>What we did with Qt 5 is to <em>add</em> another option into the mix. We want to make the usage of Javascript supported as well as C++ is supported. We are not making it the superior way or even the only way. That is a good thing, as it opens up new options for how you write your application.</p>
<p>If you want, you can do smaller pieces of application logic inside QML. It allows to do some rapid prototyping that can then be replaced by C++ in the final implementation. It gives you abilities to do application scripting. And for many apps it also gives you the <em>option</em> to write a big part of it in QML and Javascript.</p>
<p><H2>Summary</H2></p>
<p>With Qt 5, if you want to use Qt as you have always used it, please go ahead. It&#8217;s a fully supported way of doing things.</p>
<p>But I do believe that we will need more then what we have in Qt 4 for the longer term future. The expectations towards application UIs are changing drastically, especially when creating consumer-facing apps. </p>
<p>We need to have solutions available if we want Qt to stay relevant. That&#8217;s what Qt 5 is all about.</p>
<p>Cheers,<br />
Lars</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/04/18/qt-5-c-and-qt-widgets/feed/</wfw:commentRss>
		<slash:comments>246</slash:comments>
		</item>
		<item>
		<title>Cross compiling Qt for the masses</title>
		<link>http://labs.qt.nokia.com/2012/04/13/cross-compiling-qt-for-the-masses/</link>
		<comments>http://labs.qt.nokia.com/2012/04/13/cross-compiling-qt-for-the-masses/#comments</comments>
		<pubDate>Fri, 13 Apr 2012 01:57:20 +0000</pubDate>
		<dc:creator>dcarr</dc:creator>
				<category><![CDATA[Contributors]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Open Governance]]></category>
		<category><![CDATA[Qt]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8315</guid>
		<description><![CDATA[Cross compiling Qt for particular devices/BSPs can be frustrating when operating from first principles and we are trying to improve the existing configure/qmake build infrastructure in Qt 5, as well as the associated documentation, in order to ease this burden. We are approaching the problem from 2 angles: General cross compilation support Direct target support [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Cross compiling Qt for particular devices/BSPs can be frustrating when operating from first principles and we are trying to improve the existing configure/qmake build infrastructure in Qt 5, as well as the associated documentation, in order to ease this burden. We are approaching the problem from 2 angles:</p>
<ul>
<li>General cross compilation support</li>
<li>Direct target support</li>
</ul>
<p>The general cross compilation support is being improved by:</p>
<ul>
<li>Reworking the pkg-config logic</li>
<li>Introducing the -device flag to configure</li>
<li>Introducing the -sysroot flag to configure</li>
</ul>
<p>The supported targets are documented here:</p>
<p>http://wiki.qt-project.org/Devices</p>
<p>and as you can see in the Raspberry Pi documentation, we have reduced compilation for this target down to:</p>
<pre>./configure -prefix &lt;your prefix&gt; -release \
  -device linux-rasp-pi-g++ -make libs \
  -device-option CROSS_COMPILE=&lt;your toolchain path&gt;/bin/arm-none-linux-gnueabi-
  -sysroot &lt;your sysroot path&gt;</pre>
<p>The resulting build has full (single process) OpenGL ES 2 support and keyboard support for the Raspberry Pi.</p>
<p>There is no need to patch any files as all the relevant changes have been upstreamed into Qt 5 where they can be adequately reviewed and QAed like any other Qt contribution. Needless to say this drastically increases the quality of the code finding its way on to these devices and should drastically improve the user experience when dealing with this kind of hardware for prototyping/productization/recreation. Sunlight is the best disinfectant, and we delight in consuming this dog food.</p>
<p>We heartily invite any (all!) chipset vendors/chipset customers/BSP vendors or interested parties to upstream relevant mkspecs and the associated code changes to Qt, in order to extend the breadth of Qt 5&#8242;s out-of-the-box device support. The move to Open Governance has made extending this support increasingly achievable, feasible and convenient and we are very excited about both Qt 5 as a whole and the current rate of development towards embedded (read constrained) Linux platforms.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/04/13/cross-compiling-qt-for-the-masses/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Qt 3D and Qt5 / Qt4 news and releases</title>
		<link>http://labs.qt.nokia.com/2012/04/11/qt-3d-and-qt5-qt4-news-and-releases/</link>
		<comments>http://labs.qt.nokia.com/2012/04/11/qt-3d-and-qt5-qt4-news-and-releases/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 06:24:29 +0000</pubDate>
		<dc:creator>sarasmit</dc:creator>
				<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Qt 3D]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8223</guid>
		<description><![CDATA[Well its taken 3+ years for Qt 3D to be an overnight success, but here it is: we are now part of Qt5 and we&#8217;ll be front and centre in the exciting picture that will be powering a new generation of QML enhanced apps on a whole range of platforms. As a Qt5 Essential Qt [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Well its taken 3+ years for Qt 3D to be an overnight success, but here it is: we are now part of Qt5 and we&#8217;ll be front and centre in the exciting picture that will be powering a new generation of QML enhanced apps on a whole range of platforms.  As a <a href="http://qt-project.org/wiki/Qt-Essentials-Modules" title="Qt3D is listed as a Qt Essentials Module">Qt5 Essential</a> Qt 3D will be running on all those <a href="http://qt-project.org/wiki/Qt_5.0#ed49a36c4fd547e5e2ace11bef4f21cf" title="Qt5 supported platforms">supported Qt5 platforms</a> providing OpenGL accelerated 3D content defined in QML.  Its great news for us in the team, and good news for those of you using Qt 3D or planning on using it for your projects.</p>
<p>If you&#8217;re a Qt 3D fan and have been following the project for a while you&#8217;ll know that as a labs project we had to do our own releases, carefully making sure that packages we created matched the current supported versions of Qt 4.  We have in the past released easy-to-use packages for Symbian^3, N900 and the N9 platforms, as well as for Windows desktop; and supported Linux and Mac with source packages.  We got great feedback from those package releases, and saw some interesting projects built on Qt 3D.  </p>
<p>As part of Qt5 the SDK team and release program will make Qt 3D available through official Qt5 release activities. This will free us up to spend more time on performance, bug-fixing and best of all the features that we&#8217;ve been asked for.  This is fantastic news for us since packaging consumed quite a bit of our resources, and now we can focus that on improving Qt 3D.</p>
<p>Before we move away from Labs status we are making one more Qt 3D labs release: and this is it.  This follows our Qt 3D TP1 and TP2 releases with a 1.0 release as part of our Qt 4.x programme.  In this release are a number of important bug fixes, some new stuff like threaded texture and model loading, and the new Qt 3D Asset Viewer, which allows you to visually configure the models you load into your Qt 3D applications.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/IShJtdxUVKE" frameborder="0" allowfullscreen></iframe></p>
<p>Today we announce our Qt 3D 1.0 for Qt 4.8.1 with only a small amount of fanfare:  this will be our last <strong>4.x major version release</strong>.</p>
<ul>
<li><a href="ftp://ftp.qt.nokia.com/qt3d/win/2012_04_11/Qt3D-1.0.exe" title="Link to Windows binary package">Windows binary package</a></li>
<li><a href="ftp://ftp.qt.nokia.com/qt3d/noarch/2012_04_11/qt3d-1.0-src.tar.gz" title="Link to Mac/Linux/N9 source package">Source package for Mac/Linux/N9</a></li>
<li><a href="ftp://ftp.qt.nokia.com/qt3d/noarch/2012_04_11/qt3d-1.0-doc.tar.gz" title="Link to Documentation package">Documentation package.</a></li>
</ul>
<p>For Windows folks, you&#8217;ll need the Qt 4.8.1 Windows MSVC release which is <a href="http://qt.nokia.com/downloads/windows-cpp-vs2010" title="Qt 4.8.1 Windows release">available from the Qt downloads page</a>.  </p>
<p>The documentation is also available <a href="http://doc-snapshot.qt-project.org/qt3d-1.0/qt3d-building.html" title="Online documentation">on-line on the Qt project site</a>.</p>
<p>For N9 developers we no longer create a package.  The <a href="http://qt.nokia.com/downloads" title="SDK download">publicly available Qt SDK</a> can build these packages for you from our source download using the Qt 4.7.x Harmattan support, that is built right in to your SDK.  Just follow the special <a href="http://doc.qt.nokia.com/qt-quick3d-snapshot/qt3d-building.html" title="How to Build Qt3D" target="_blank">N9 instructions in our build documentation</a>.  For Symbian likewise you will need to create your own packages.  For folks using a MinGW based Qt on Windows, you will need to use the source package also.</p>
<p>Why are we not supplying N9 or Symbian packages for Qt 3D 1.0 against Qt 4.x?  Since Qt 3D 1.0 for 4.x is a labs project, our previous device packages were not official Nokia system packages, and just functioned as a convenience to the developer. This is why we&#8217;re asking that you create your own packages to underscore the fact that Nokia does not supply Qt 3D system packages as part of Qt 4.x, and you&#8217;ll need to do your own work to include any Qt 3D functionality in your device apps.  Apologies for this, but its the way it is for our 4.x labs status programme.  Qt 3D team remains available on IRC and via our email lists (see below) to support you as far as possible when including Qt 3D in your apps, but unfortunately for Qt 4.x we cannot supply Nokia system packages for these platforms.</p>
<p>What about Qt5?  That is where the excitement lies, with a vastly improved QML rendering engine, which has the benefit for Qt 3D of guaranteed OpenGL support.  If you have QML2 then you have OpenGL and that means Qt 3D is ready to go on any Qt5 platform.  We&#8217;d love you to try out Qt 3D on Qt5 &#8211; go and check out the <a href="http://labs.qt.nokia.com/2012/04/03/qt-5-alpha/" title="Qt5 Alpha release">Qt5 Alpha release</a> which has just been announced, and tell us what you think.  If you want to try out the bleeding edge, you can also get <a href="http://qt-project.org/wiki/Building_Qt_5_from_Git" target="_blank">Qt 3D in Qt5 by building from Git</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/04/11/qt-3d-and-qt5-qt4-news-and-releases/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Qt 5 Alpha</title>
		<link>http://labs.qt.nokia.com/2012/04/03/qt-5-alpha/</link>
		<comments>http://labs.qt.nokia.com/2012/04/03/qt-5-alpha/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 13:57:40 +0000</pubDate>
		<dc:creator>Lars Knoll</dc:creator>
				<category><![CDATA[Qt]]></category>
		<category><![CDATA[qt5]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8234</guid>
		<description><![CDATA[Today we released the Alpha of Qt 5, the first major release since the Qt Project went live. A lot of people have worked hard to make this release happen. A large amount of work and features that went into this alpha have been coming from people not working for Nokia. It’s great to see [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Today we released the Alpha of Qt 5, the first major release since the Qt Project went live. A lot of people have worked hard to make this release happen. A large amount of work and features that went into this alpha have been coming from people not working for Nokia. It’s great to see that the project has become a place where many people meet and together push Qt forward.</p>
<p>The main purpose of the Qt 5 Alpha release is to get feedback that helps us make the coming releases better. For the Alpha we focus on the delivering the Qt Essential modules, which forms the foundation of the functionality Qt 5 will offer.</p>
<p>The alpha can be downloaded from <a href="http://qt-project.org/wiki/Qt-5-Alpha">http://qt-project.org/wiki/Qt-5-Alpha</a>. Note that the alpha release is a source-only release without binaries to download, so you need to build the binaries yourselves. Build instructions can be found at <a href="http://qt-project.org/wiki/Qt-5-Alpha-building-instructions">http://qt-project.org/wiki/Qt-5-Alpha-building-instructions</a></p>
<p>We have now been working for around 9 months on Qt 5, following the ideas I outlined in a <a href="http://labs.qt.nokia.com/2011/05/09/thoughts-about-qt-5/">blog</a> in May last year. The blog talked about a couple of objectives we had for Qt 5, and I’d like to reflect a bit on what we achieved.</p>
<h2>The Vision</h2>
<p>There was one basic vision driving a lot of the Qt 5 work:</p>
<p><em>“Qt 5 should be the foundation for a new way of developing applications. While offering all of the power of native Qt using C++, the focus should shift to a model, where C++ is mainly used to implement modular backend functionality for Qt Quick.”</em></p>
<p>I can say that we came a good way closer to this vision with Qt 5.0. The model is working nicely on the embedded side of Qt where UIs are full screen. On the desktop, we have laid most of the foundations required for this model, but it’ll take us until 5.1 or 5.2 to really take this into use.</p>
<h2>Developing in the open</h2>
<p>We wanted to develop Qt 5 in the open, with a strong community around it. Since the launch of <a href="http://qt-project.org">qt-project.org</a>, we have seen a vibrant community forming there, and many of the patches and new features we will have in Qt 5 are coming from the community.</p>
<h2>Four big architectural changes</h2>
<p>Then we had set out to do four major changes to Qt’s internal architecture:</p>
<ol>
<li><strong>Base all Qt ports on Qt Platform Abstraction layer (QPA) &#8211; Make it easier to port Qt to other windowing systems and devices</strong><br />
With <a href="http://qt-project.org/wiki/Qt-Platform-Abstraction">QPA</a> we have fundamentally changed how Qt integrates with the windowing system of the underlying OS. QPA was introduced in Qt 4.8 as a replacement for QWS/Qt Embedded, but is now used exclusively for all platforms. This move created a lot of work and forced us to rewrite a very large part of pour platform dependent code. But it also helped us create a much cleaner architecture where the platform dependent code is nicely abstracted. We can see that the new abstraction makes it significantly easier to write integration with new windowing systems, and the backends that are being written for QNX, Android and iOS prove this.</li>
<li><strong>Re-architect our graphics stack &#8211; Increase performance versus Qt 4, using Qt Quick and OpenGL (ES) 2.0</strong><br />
Qt 5 introduces a new graphics architecture for Qt Quick, using a Scenegraph on top of OpenGL. This requires OpenGL (ES) 2.0 at the minimum to work. QtGui now contains a set of QOpenGL* classes, that replace the old QGL* classes (they are still available for compatibility). We also introduced a new QGuiApplication class that is more lightweight than QApplication and a QWindow class for handling top level windows on the screen.The QWidget based stack continues to work as in Qt 4.x, based on QPainter. QPainter does however support less backends than it used to. It is now limited to SW rasterization (Raster backend) for drawing to the screen, pixmaps and images, an OpenGL backend for GL surfaces and a backend for PDF generation and printing. The platform dependent backends using X11 or CoreGraphics are gone.This allows us to introduce the new graphics architecture for the long term while keeping full compatibility with Qt 4.x on the QWidget side.</li>
<li><strong>Modular repository structure for increased flexibility and to meet the merge of desktop and mobile &#8211; add /remove user specific modules as needed and a full integration of the Qt mobility APIs</strong><br />
This is mainly an internal housekeeping item, that won’t be directly visible to developers using Qt. But the modularization of the Qt repositories makes it easier for us to move the different parts of Qt forward in a more independent way. This will become increasingly important now that Qt 5 is stabilizing and once we release 5.0 and start keeping binary compatibility.The modularization is not yet fully done, esp. the qtbase repository still contains many modules that should be separated. So this work will most likely continue after 5.0 is out.The modularization of Qt also makes it a lot easier to integrate contributions in form of 3rd party modules to Qt. It also responds to the trend of having different requirements on laptops and tablets/mobiles with regard to especially mobile features such as locations, sensors etc.In Qt 5 we will see the Qt mobility APIs as an integrated part of Qt – some of them as part of the group of modules that are seen to be essential for Qt = “Qt Essentials”. By offering the modular approach, other modules can be added in a simple way, and we are already today sure that Qt5 will offer a richer feature list than any earlier Qt version. Please notice that this alpha release is focused on Qt Essentials.</li>
<li><strong>Separate all QWidget related functionality into its own library</strong><br />
By separating QWidgets into a separate repository, we secure a continued use of QWidgets for those that desire, but also a path to a model where all UIs are being done in QML and Qt Quick. Separating the QWidget based functionality into its own library is therefore a good measure to achieve a clean architecture in Qt 5 in the long term.</li>
</ol>
<p>The announcement of these changes created a lot of response, and we have already <a href="http://labs.qt.nokia.com/2011/05/11/responses-to-qt-5/">addressed</a> a lot of the common questions about Qt 5 and these architectural changes earlier.</p>
<h2>New functionality</h2>
<p>In addition to the architectural changes, Qt 5 also offers a lot of new functionality. I’d just like to highlight a couple of them here, you can find a detailed list with descriptions on our <a href="http://qt-project.org/wiki/Qt-5Features">wiki</a>.</p>
<ul>
<li><strong>Qt Core</strong><br />
Many new features have been added to QtCore. We now have a QStandardPaths class giving you the standard locations for things such as media and documents on your platform. A JSON parser and speed optimized binary format for JSON are included. We have added support for Mimetype recognition, both on extension and file content. A new compile time checked signal/slot connection syntax has been added and we have a completely new Perl compatible regular expression engine included.Many of our data structures have been rewritten and optimized for better performance. We also added C++11 support where it makes sense. But Qt continues to compile and work with a C++98 compliant compiler.</li>
<li><strong>Qt Gui</strong><br />
All QWidget based classes have been separated out into the QtWidgets library. QtGui has gained support for top level surfaces through the QWindow class, and now has builtin OpenGL support.</li>
<li><strong>Qt Network</strong><br />
We added support for DNS lookups and removed the QHttp and QFtp classes (they are available standalone for those that need them). Lots of smaller improvements.</li>
<li><strong>Qt Widgets</strong><br />
Got ported over to the new QPA architecture and should work as you are used to from Qt 4.x.</li>
<li><strong>Qt Quick</strong><br />
The Qt Quick from Qt 4.x times is now available in a Qt Quick 1 module and fully compatible. That module is done and won’t be developed any further.Focus here is now on the new Qt Quick and Qt Qml modules. In Qt 5 we have separated the graphical parts of Qt Quick from the QML and JS language into separate modules. The new JS classes (QJSEngine and QJSValue) are now using Google’s V8 engine behind the scenes giving us much better performance for JavaScript. The QML engine has also undergone lots of performance improvements and some enhancements to the language.The Qt Quick module contains the OpenGL based Scenegraph and all the basic items that are known from Qt Quick in Qt 4.x. We added support for GL based shader effects, particles and many other things. On the QML side things are mostly source compatible, but when writing QML items in C++ some changes are needed to adjust to the new scene graph.</li>
<li><strong>Qt 3D and Qt Location</strong><br />
Some additional modules have been added to the set of Qt Essentials, most notably Qt 3D to integrate 3d content with Qt and Qt Location giving access to GPS, Maps and other location based services.</li>
<li><strong>Qt WebKit</strong><br />
The WebKit C++ APIs have not changed since Qt 4.x, but Qt Webkit got updated to a newer version from webkit.org giving us many improvements and better HTML 5 compliance. Compilation is currently disabled on Windows for this alpha, as building it right now is rather complex. We&#8217;re working on having this re-enabled and fully working for the beta.</li>
</ul>
<h2>Porting from Qt 4.x to Qt 5</h2>
<p>There is a binary and to a smaller extent source compatibility break between Qt 4.x and Qt 5. We have however worked hard to make an easy and smooth transition of existing code to Qt 5 possible. As an example we currently have Qt Creator compiling and running against Qt 4.x and Qt 5 using the same code base.</p>
<p>If you want to try out your own project against Qt 5, you can find detailed porting instructions <a href="http://wiki.qt-project.org/Transition_from_Qt_4.x_to_Qt5">here</a>.</p>
<p>Please also note that there is no immediate need to port your app to Qt 5, as Qt 4.8 is still there and supported by the community and companies such as Digia for some time to come. But we firmly believe that Qt 5 will offer enough benefits to consider moving.</p>
<h2>Next steps</h2>
<p>As you can see a lot of things have happened since the work on Qt 5.0 started. I am very happy with what we have achieved so far. You can now all help us finalizing Qt 5 by downloading the alpha, trying it out and giving us feedback.</p>
<p>All feedback should go to the qt development list (development@qt-project.org, see also <a href="http://lists.qt-project.org/mailman/listinfo/development">lists.qt-project.org</a>), or simply reported as bug reports in our <a href="http://bugreports.qt-project.org">bug tracking system</a>. Any patches and bug fixes are of course also highly welcome, please submit these to <a href="http://codereview.qt-project.org">codereview.qt-project.org</a>.</p>
<p>The Alpha is the first step towards a final release of Qt 5, and focus from now on will be fully on ironing out the remaining issues so that we can deliver a final Qt 5.0 to you as soon as possible.</p>
<p>There have been too many people involved in getting to this point to mention them all, but I’d like to say thanks to every one who has contributed in some form to this release.</p>
<p>Enjoy!</p>
<p>Lars</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/04/03/qt-5-alpha/feed/</wfw:commentRss>
		<slash:comments>106</slash:comments>
		</item>
		<item>
		<title>Qt Creator 2.5 beta</title>
		<link>http://labs.qt.nokia.com/2012/03/15/qt-creator-2-5-beta/</link>
		<comments>http://labs.qt.nokia.com/2012/03/15/qt-creator-2-5-beta/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 13:42:07 +0000</pubDate>
		<dc:creator>Daniel Teske</dc:creator>
				<category><![CDATA[Qt]]></category>
		<category><![CDATA[QtCreator]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8167</guid>
		<description><![CDATA[We just published the Qt Creator 2.5 beta. This release is full of goodies, and as usual we&#8217;d like to give you a small tour through the new features, though we can&#8217;t possible cover all of them in one blog post. The C++11 standard was published last September. We are happy that Qt Creator 2.5 [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>We just published the Qt Creator 2.5 beta. This release is full of goodies, and as usual we&#8217;d like to give you a small tour through the new features, though we can&#8217;t possible cover all of them in one blog post.</p>
<p><a href="http://labs.qt.nokia.com/wp-content/uploads/2012/03/taskicons1.png"><img src="http://labs.qt.nokia.com/wp-content/uploads/2012/03/taskicons1.png" alt="" title="Icons for build errors and C++11 support" width="533" height="399" class="alignright size-full wp-image-8214" /></a>The <a href="http://en.wikipedia.org/wiki/C%2B%2B11">C++11</a> standard was published last September. We are happy that Qt Creator 2.5 understands more of C++11 e.g. nullptr, constexpr, static_assert, noexcept, inline namespaces, auto, and partially lambda. And as usual we implemented some new refactoring operations, such as:</p>
<ul>
<li>A basic refactoring action to insert an #include for an undefined identifier</li>
<li>A &#8220;extract function&#8221; refactoring action</li>
<li>A &#8220;rearrange parameter list&#8221; refactoring action</li>
<li>Signature synchronization: changing parameter names in the declaration automatically changes them in the function body</li>
</ul>
<p>The debuggers used on Linux and MinGW also pretty print some of the new C++11 types, such as std::shared_ptr, std::unique_ptr, std::array. In addition pretty printers for std::complex, boost::posix_time::{ptime,time_duration}, boost::gregorian::date are new in Qt Creator 2.5. Also more often than before, Qt Creator figures out the correct dynamic type of your pointers and thus pretty prints using the dynamic type.</p>
<p>One day before the <a title="2.4 beta" href="http://labs.qt.nokia.com/2011/10/20/qt-creator-2-4-0-beta-released/">2.4 beta</a> was released <a title="Open Governance" href="http://labs.qt.nokia.com/2011/10/21/the-qt-project-is-live/">Open Governance</a> launched. Since then, 78 people used <a href="http://codereview.qt-project.org">Codereview</a> to submit patches to Qt Creator. That&#8217;s great and shows the power and ease of use of gerrit. If you haven&#8217;t used gerrit yet, it&#8217;s a tremendous improvement to gitorious. It takes a few commands to <a href="http://wiki.qt-project.org/Setting_up_Gerrit">set up gerrit</a> but afterwards publishing a patch for review is just one git push away, but don&#8217;t forget to add reviewers to your change.</p>
<p><a href="http://labs.qt.nokia.com/wp-content/uploads/2012/03/todoscreenshot3.png"><img src="http://labs.qt.nokia.com/wp-content/uploads/2012/03/todoscreenshot3.png" alt="" title="TODO plugin" width="533" height="344" class="alignright size-full wp-image-8215" /></a>One of the big contributions to 2.5 is a TODO plugin. It is still lacking some polish so it is disabled by default, though it is already quite useable. Please give it a try by enabling it in Help/About Plugins. Many thanks to Dmitry and Vasiliy. We would like to thank everyone that contributed to Qt Creator and like especially highlight the good work that Orgad does, not only did he contribute over 30 commits to this release but he&#8217;s also the most active bug reporter apart from our QA team. In fact, he found a crash just hours before the beta release.</p>
<p>Apart from those big features, 2.5 also includes lots of <em>small</em> features, to mention just two:</p>
<ul>
<li>A clipboard history, use Ctrl+Shift+V to cycle</li>
<li>Showing small icons for build errors in the editor margin and updating the line numbers of build errors while editing. See the screenshot above.</li>
</ul>
<p>And then, before I forget, check out the previous blogs on <a href="http://labs.qt.nokia.com/2012/03/01/debugging-qt-quick-2-console-api/">Debugging Qt Quick 2 – Console API</a> and <a href="http://labs.qt.nokia.com/2012/02/07/qml-profiler-update/">QML Profiler update</a> .</p>
<p>For even more information on the changes in 2.5, see the <a href="https://qt.gitorious.org/qt-creator/qt-creator/blobs/2.5/dist/changes-2.5.0">changelog</a>.</p>
<p>You can download Qt Creator from <a href="http://qt-project.org/wiki/Qt_Creator_Releases">http://qt-project.org/wiki/Qt_Creator_Releases</a></p>
<p>We appreciate any bug reports, feedback, patches via the <a href="http://lists.qt-project.org/mailman/listinfo/qt-creator">mailing list</a>, the <a href="https://bugreports.qt-project.org/">bug tracker</a>, <a href="http://codereview.qt-project.org/">gerrit</a> and the #qt-creator IRC channel on freenode.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/03/15/qt-creator-2-5-beta/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
		<item>
		<title>Debugging Qt Quick 2 &#8211; Console API</title>
		<link>http://labs.qt.nokia.com/2012/03/01/debugging-qt-quick-2-console-api/</link>
		<comments>http://labs.qt.nokia.com/2012/03/01/debugging-qt-quick-2-console-api/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 10:49:58 +0000</pubDate>
		<dc:creator>Aurindam Jana</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Qt Quick]]></category>
		<category><![CDATA[Qt Quick 2]]></category>
		<category><![CDATA[QtCreator]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8144</guid>
		<description><![CDATA[Qt Quick brings a lot of flexibility and speed to development. Traditionally one had to do the &#8220;compile, package, deploy, run&#8221; cycle over and over again, whereas with Qt Quick you can now do incremental changes to your source even at runtime! In Qt Creator, we are trying to leverage the power of Qt Quick, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Qt Quick brings a lot of flexibility and speed to development. Traditionally one had to do the &#8220;compile, package, deploy, run&#8221; cycle over and over again, whereas with Qt Quick you can now do incremental changes to your source even at runtime! In Qt Creator, we are trying to leverage the power of Qt Quick, version by version. However, as with any programming language there is a downside. Script compilation errors are runtime errors in QML, sometimes you&#8217;re trying to wrap your mind around QtDeclarative binding loops, JavaScript has many dark corners that you don&#8217;t want to be caught in and so on&#8230; All these potential pitfalls mean that a good debugger, profiler and inspector are weapons you really want to have <img src='http://labs.qt.nokia.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The focus in this blog post is on debugging and the most straightforward debugging technique: The console API. Chances are high that you&#8217;ve already used it in your first helloworld.qml file, since console.log() is a part of it. We recently updated Qt 5 with some of the most useful methods from the <a href="http://getfirebug.com/wiki/index.php/Console_API">FireBug console API </a>(a defacto standard in web browsers).</p>
<h1>Logging</h1>
<p>We&#8217;ve been supporting console.log and console.debug since Qt Quick 1.0. The print() from QtScript days still works but as it has a slightly different meaning, when you execute it in JavaScript code in a web browser, it should be left alone. In Qt 5 we added a few more logging functions. All the calls are directly forwarded to its Qt counterparts:</p>
<table width="414">
<tbody>
<tr>
<th>JavaScript function</th>
<th>Qt/C++ counterpart</th>
</tr>
<tr>
<td>console.log()</td>
<td>qDebug()</td>
</tr>
<tr>
<td>console.debug()</td>
<td>qDebug()</td>
</tr>
<tr>
<td>console.info()</td>
<td>qDebug()</td>
</tr>
<tr>
<td>console.warn()</td>
<td>qWarning()</td>
</tr>
<tr>
<td>console.error()</td>
<td>qCritical()</td>
</tr>
</tbody>
</table>
<p>Yes, at the moment, console.log(), console.debug(), and console.info() have the same functionality! Since they are some of the most often used methods and can be found in countless JavaScript code snippets on the net, we&#8217;re supporting them. Maybe it&#8217;s also food for thought that we should add an additional log level to qlogging.h <img src='http://labs.qt.nokia.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h1>Profiling</h1>
<p>Ever wondered about how long a particular code path takes? Take for example the logic in your onCompleted method.</p>
<pre>Component.onCompleted() {
  console.time("onCompleted");
  // ...
  console.timeEnd("onCompleted");
}</pre>
<p>will print the time in milliseconds. The string argument is both an identifier for the particular measurement (you can also make interleaved measurements) and the prefix for the output:</p>
<pre>onCompleted: 401ms</pre>
<p>For a more in-depth analysis there&#8217;s console.profile(), console.profileEnd().</p>
<pre>Component.onCompleted() {
  console.profile();
}</pre>
<pre>Component.onDestruction() {
  console.profileEnd();
}</pre>
<p>The API pair profiles both the state of the QDeclarativeEngine as well as V8 method calls. However, to retrieve the data you have to attach the QML Profiler tool to your application before calling console.profileEnd() else the profiling data is lost. <a title="Christiaan Janssen" href="http://labs.qt.nokia.com/author/cjanssen/" target="_blank">Christiaan Janssen</a> has already described the QML Profiler tool that ships with Qt Creator in a previous post <a title="QML Profiler update" href="http://labs.qt.nokia.com/2012/02/07/qml-profiler-update/" target="_blank">here</a>. A standalone profiler tool is available in Qt 5 that saves the profiling data in a file. This file can then be read using Qt Creator.</p>
<h1>Still More&#8230;</h1>
<p>We have also introduced the following APIs:</p>
<p>console.assert() : To test an expression and print an optional message and the stack trace of JavaScript execution if the expression evaluates to false.</p>
<p>console.exception(): Prints an error message and the stack trace of JavaScript execution.</p>
<p>console.trace(): Prints a stack trace of JavaScript execution at the point where it is called.</p>
<p>console.count(): Prints the number of times this function is called along with a user provided message.</p>
<h1>Script Console &#8211; New Avatar</h1>
<p>The QML console was first introduced in Qt Creator 2.1. However, it was a simplified console limited to evaluating simple expressions. We felt that Qt Quick2 developers need a more advanced console to unleash the power of QML.</p>
<p>We introduce to you the new avatar of the QML Console a.k.a. Script Console.</p>
<p>&nbsp;</p>
<div id="attachment_8164" class="wp-caption aligncenter" style="width: 707px">
	<a href="http://labs.qt.nokia.com/wp-content/uploads/2012/03/ScriptConsole21.png"><img class="size-full wp-image-8164" title="ScriptConsole" src="http://labs.qt.nokia.com/wp-content/uploads/2012/03/ScriptConsole21.png" alt="QML Console" width="707" height="500" /></a>
	<p class="wp-caption-text">Script Console in Qt Creator</p>
</div>
<p>Apart from evaluating expressions, the Script Console shows the debug output, both Qt debug messages and JavaScript console messages, in a pretty way <img src='http://labs.qt.nokia.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  You can use the filter buttons located in the top right corner to view logs that appeal to you. For example, if you want to see only the errors, then de-select the info and warning buttons and Voilà! The debug output also shows the file and line info and clicking on it opens the relevant file in the editor with the cursor on the particular line. No more do you need to add context info in your output messages to locate them in your source code. Also you can always rely on the Find toolbar to search for text in the console.</p>
<p>JavaScript objects and arrays are shown in an expandable tree in the console. The current context, which is used to evaluate the expressions,  is displayed in the status bar. The Script Console can be used even when not on a debug break to inspect and evaluate QML elements and expressions. The Script Console also supports multi-line input. It also remembers your previous inputs so that you don&#8217;t need to type that really long expression again.</p>
<p>The best thing is that you do not have to wait for too long as the Script Console will be a part of Qt Creator 2.5.</p>
<h1>What&#8217;s missing?</h1>
<p>We haven&#8217;t implemented the methods dealing with the console so far, just because they don&#8217;t make too much sense when your console is just the command line. For example, it would be hard to implement console.clear() in a portable way <img src='http://labs.qt.nokia.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  We left out console.group(), console.groupCollapsed(), console.groupEnd(), console.table(), console.dir(), console.dirXml() for similar reasons.</p>
<p>The Script Console in Qt Creator is WIP.  Currently, QML objects and arrays are not shown in a tree. The console still needs polishing and do expect more features in later versions.</p>
<p>We are eager to hear your wish list and your experiences with the console. You can contact us via the <a title="Qt Creator Mailing List" href="http://lists.qt-project.org/mailman/listinfo/qt-creator">qtcreator mailing list</a> or on IRC at the freenode server, channel #qt-creator.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/03/01/debugging-qt-quick-2-console-api/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Pimp my video: shader effects and multimedia</title>
		<link>http://labs.qt.nokia.com/2012/02/29/pimp-my-video-shader-effects-and-multimedia/</link>
		<comments>http://labs.qt.nokia.com/2012/02/29/pimp-my-video-shader-effects-and-multimedia/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 13:22:23 +0000</pubDate>
		<dc:creator>Gareth Stockwell</dc:creator>
				<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[OpenGL]]></category>
		<category><![CDATA[Qt Quick]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8078</guid>
		<description><![CDATA[Introduction A topic which has been receiving quite a bit of attention recently is the use of shader programs to apply effects within Qt Quick applications. Once you have grasped the basics of the shader programming language, embedding the shaders in your application is made really easy by Qt Quick, with the result that stunning [...]]]></description>
			<content:encoded><![CDATA[<p></p><h2>Introduction</h2>
<p>A topic which has been receiving quite a bit of attention recently is the use of shader programs to apply effects within Qt Quick applications. Once you have grasped the basics of the shader programming language, embedding the shaders in your application is made really easy by Qt Quick, with the result that stunning visual effects can be achieved from a surprisingly small amount of code.</p>
<p>What hasn&#8217;t been mentioned previously in this blog is that applying shader effects to multimedia content (video playback, or a camera viewfinder) is just as easy as transforming any other QML element. This post shows some of the results you can achieve by combining shader programming with QtMultimedia.</p>
<p>The best way to demonstrate some of the effects you can achieve is &#8230; with a demo, so that&#8217;s where we&#8217;ll start.</p>
<div align="center">
<table class="aligncenter" border=0>
<tbody>
<tr>
<td>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/SMRln8FJvKc?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
</td>
</tr>
<tr>
<td align="center">qmlvideofx demo running on Qt 5, on desktop Linux</td>
</tr>
</tbody>
</table>
</div>
<p>The videos above show a Qt Quick 2 demo app, running on a desktop Linux machine. Aside from some ancillary C++ code (listening to scene graph signals in order to calculate the frame rate, and reading shader programs from the file system), the app is entirely written in QML.</p>
<h2>Implementation details</h2>
<p>As <a href="http://labs.qt.nokia.com/2011/03/22/the-convenient-power-of-qml-scene-graph/">previously described</a>, Qt Quick 2 comes with built-in support for shader effects via the <a href="http://doc.qt.nokia.com/5.0-snapshot/qml-qtquick2-shadereffect.html">ShaderEffect</a> QML element. Using this to apply an effect to video or viewfinder content really isn&#8217;t any more difficult than applying the same effect to any other QML element. To illustrate this, the code snippet below shows a time-varying wobble effect being applied to a video clip which is played from a file.</p>
<pre class="code" style="margin-left: 20px; margin-right: 20px;">import QtQuick 2.0
import QtMultimedia 5.0

Rectangle {
    width: 600
    height: 400

    MediaPlayer {
        id: mediaPlayer
        autoplay: true
        source: "test.ogg"
    }

    VideoOutput {
        id: videoOutput
        anchors.fill: parent
        source: mediaPlayer
    }

    ShaderEffect {
        anchors.fill: parent

        // Properties which will be passed into the shader as uniforms
        property real amplitude: 0.02
        property real frequency: 20
        property real time: 0

        NumberAnimation on time {
            loops: Animation.Infinite
            from: 0
            to: Math.PI * 2
            duration: 600
        }

        property variant source: ShaderEffectSource {
            sourceItem: videoOutput
            hideSource: true
        }

        fragmentShader: "
            uniform highp float amplitude;
            uniform highp float frequency;
            uniform highp float time;
            uniform sampler2D source;
            uniform lowp float qt_Opacity;
            varying highp vec2 qt_TexCoord0;
            void main() {
                highp vec2 p = sin(time + frequency * qt_TexCoord0);
                highp vec2 tc = qt_TexCoord0 + amplitude * vec2(p.y, -p.x);
                gl_FragColor = qt_Opacity * texture2D(source, tc);
            }
        "
    }
}</pre>
<p>Applying the effect to a viewfinder stream rather than to video playback is simply a matter of replacing the Video element with a Camera element.</p>
<p>In the qmlvideofx demo, each effect is implemented as a QML element which inherits from ShaderEffect; these elements are dynamically loaded and applied to the video content when the user selects the corresponding effect from the menu. Similarly, the different inputs (image, video and camera) are represented by QML elements which are dynamically loaded when required.</p>
<p>The set of parameters supported by each effect (e.g. &#8216;granularity&#8217; for Pixelate; &#8216;radius and diffraction&#8217; for Magnify) is exposed as a ListModel which is used to construct sliders via which the parameter values can be adjusted.</p>
<h2>The code (Qt 5.x)</h2>
<p>The source for the qmlvideofx demo can be found in the qtmultimedia repository here:</p>
<p><a href="https://qt.gitorious.org/qt/qtmultimedia/trees/master/examples/video/qmlvideofx">https://qt.gitorious.org/qt/qtmultimedia/trees/master/examples/video/qmlvideofx</a></p>
<p>Until Qt 5.0 is released, you&#8217;ll have to build it from source in order to build and run the demo. Instructions for how to do that can be found on the wiki <a href="http://developer.qt.nokia.com/wiki/Building_Qt_5_from_Git">here</a>. The required subset of Qt modules can be cloned as follows:</p>
<pre class="code" style="margin-left: 20px; margin-right: 20px;">$QTDIR/init-repository --module-subset=qtbase,qtdeclarative,qtjsbackend,qtmultimedia,qtxmlpatterns</pre>
<h2>The code (Qt 4.x)</h2>
<p>While Qt Quick 1 does not have built-in support for shader effects, it is provided by the <a href="http://doc.qt.nokia.com/4.8-snapshot/qml-shadereffectitem.html">Qt.labs.shaders</a> plugin, which is shipped with Qt from version 4.7.4 onwards. A Qt 4 version of the demo is available here:</p>
<p><a href="https://qt.gitorious.org/qt-mobility/qt-mobility/trees/master/demos/video/qmlvideofx">https://qt.gitorious.org/qt-mobility/qt-mobility/trees/master/demos/video/qmlvideofx</a></p>
<p>In addition to running on desktop platforms (tested on Linux and Windows), the Qt 4 version of the demo will also run on mobile devices &#8211; the video below shows it running on a Symbian device (Nokia C-701).</p>
<div align="center">
<table class="aligncenter" border=0>
<tbody>
<tr>
<td>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/aBuBlpUSajM?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
</td>
</tr>
<tr>
<td align="center">qmlvideofx demo running on Qt 4, on Symbian (Nokia C-701)</td>
</tr>
</tbody>
</table>
</div>
<p>Keen-eyed viewers will notice that the app has a slightly different UI to the desktop version &#8211; thanks to the flexibility of Qt Quick, that is achieved by substituting a single QML file which describes the layout.</p>
<p>It should be noted that the app will not run on currently available versions of the Symbian platform. The reason is that it requires the output of the video decoder to be available to the OpenGLES engine as a texture. An EGL extension which allows the video and graphics stacks to cooperate in this way (EGL_NOK_image_endpoint2) will be added in a future Symbian release. Once this is available, QtMultimediaKit will automatically make use of it (see <a href="https://bugreports.qt-project.org/browse/QTMOBILITY-1818">QTMOBILITY-1818</a>), and the demo will start working.</p>
<p>You can, however, run the app today on the Nokia N9 &#8211; as shown by the video below.</p>
<div align="center">
<table class="aligncenter" border=0>
<tbody>
<tr>
<td>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/Uy88gM-ItKA?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
</td>
</tr>
<tr>
<td align="center">qmlvideofx demo running on Qt 4, on MeeGo Harmattan (Nokia N9)</td>
</tr>
</tbody>
</table>
</div>
<h2>Further information</h2>
<p>If you weren&#8217;t already excited about the potential of shader effects, hopefully you are now. Below are some links to other examples of their use in conjunction with Qt/QML.</p>
<ul>
<li><a href="http://labs.qt.nokia.com/2012/02/02/qt-graphical-effects-in-qt-labs/">Qt Labs Blog: Qt Graphical Effects in Qt Labs</a></li>
<li><a href="http://labs.qt.nokia.com/2011/03/22/the-convenient-power-of-qml-scene-graph/">Qt Labs Blog: The convenient power of QML Scene Graph</a></li>
<li><a href="http://labs.qt.nokia.com/2011/05/31/qml-scene-graph-in-master/">Qt Labs Blog: QML Scene Graph in Master</a></li>
<li><a href="http://www.youtube.com/watch?v=A-vBbqamNBU">YouTube: Raspberry Pi, Qt 5, QML, Shaders</a></li>
<li><a href="http://www.youtube.com/watch?v=P4kv-AoAJ-Q">YouTube: Livecoding video effects with Qt5</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/02/29/pimp-my-video-shader-effects-and-multimedia/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Introducing qbs</title>
		<link>http://labs.qt.nokia.com/2012/02/15/introducing-qbs/</link>
		<comments>http://labs.qt.nokia.com/2012/02/15/introducing-qbs/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 18:17:29 +0000</pubDate>
		<dc:creator>Jörg</dc:creator>
				<category><![CDATA[Build system]]></category>

		<guid isPermaLink="false">http://labs.qt.nokia.com/?p=8005</guid>
		<description><![CDATA[Over the years we have developed a kind of a love-hate relationship towards qmake. It does its job but also has its quirks and is widely considered unmaintainable. The blog post [TMQB] contains a wish list for a qmake replacement. We have considered the various tools on the market, but none satisfied us &#8211; see [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Over the years we have developed a kind of a love-hate relationship towards qmake. It does its job but also has its quirks and is widely considered unmaintainable. The blog post <a href="http://labs.qt.nokia.com/2009/10/12/to-make-or-not-to-make-qmake-and-beyond/">[TMQB]</a> contains a wish list for a qmake replacement. We have considered the various tools on the market, but none satisfied us &#8211; see for example <a href="http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-June/000494.html">[WNCM]</a>. So some time ago we have initiated an internal project to try some of the ideas. This is the outcome of it: the Qt Build Suite, aka qbs (pronounced as &#8220;Cubes&#8221;).</p>
<h2>It is not qmake</h2>
<p>Unlike qmake, qbs is not tied to the Qt version, and it generates a proper build graph (dependency graph) from the high-level project description in the project file. Also, classical makefile generators like qmake and CMake create makefiles and leave the execution of the actual build commands to tools like make or ninja. Qbs on the other hand fills the role of a parallel make and directly calls the compiler, linker and other tools, pretty much like SCons and Ant do.</p>
<h2>Declarative Language</h2>
<p>The language of qbs is a simplified version of QML, providing an IDE-friendly representation of software projects. Still it provides the freedom of writing all kinds of JavaScript expressions on the right-hand-side of property bindings. A project file editor could know how to edit file lists that are pure string array literals. For more complicated constructs it would fall back to opening the project file in a text editor.</p>
<pre class="brush:cpp">
files: ["foo.h", "foo.cpp", "main.cpp"]              // editable from IDE
files: generateFileList().concat(['extra.cpp'])      // only editable in your text editor
</pre>
<p>For most use cases it should be possible to write IDE-friendly project files. But if you need more power, you are free to unleash all your l33t JavaScript skillz.</p>
<p>Now let&#8217;s have a look at the obligatory &#8220;Hello World&#8221; example:</p>
<pre class="brush:cpp">// helloworld.qbp
import qbs.base 1.0

CppApplication {
     name: "HelloWorld"
     files: "main.cpp"
}</pre>
<p>The import statement enables us to use items like &#8220;Application&#8221;. We are giving our application the name &#8220;HelloWorld&#8221; and adding a C++ source file to it. </p>
<p>A thorough walk-through of the language can be found in the documentation under &#8220;language introduction&#8221;.</p>
<h2>Extensible</h2>
<p>Dealing with code generators or resource compilers is something you really want to avoid in qmake. In qbs you can easily write rules to transform files of a certain type to files of another type. One can either call processes that do the transformation externally (e.g., rcc) or directly execute the transformation in JavaScript. This simplified example demonstrates how to turn the .pluginspec.in files of the Qt Creator source tree to .pluginspec files.</p>
<pre class="brush:cpp">Rule {
    ...
    prepare: {
        var cmd = new JavaScriptCommand();
        cmd.description = "generating " + FileInfo.fileName(output.fileName);
        cmd.qtcreator_version = product.module.qtcreator_version;
        cmd.sourceCode = function() {
            var inf = new TextFile(input.fileName);
            var all = inf.readAll();
            all = all.replace(new RegExp('\\\$\\\$QTCREATOR_VERSION(?!\w)', 'g'), qtcreator_version);
            var file = new TextFile(output.fileName, TextFile.WriteOnly);
            file.write(all);
            file.close();
        }
        return cmd;
    }
}</pre>
<h2>Fast incremental builds</h2>
<p>Qbs sees the project as whole and thus does not need to fork itself for subdirectories. Even if only a part of the project is built, the whole build graph is taken into consideration. The problems of recursive make (see <a href="http://aegis.sourceforge.net/auug97.pdf">[RMCH]</a>) are no more.</p>
<p>This also has the consequence that incremental builds are much faster than with make. I have modified the benchmark generator script from <a href="http://gamesfromwithin.com/the-quest-for-the-perfect-build-system">[QPBS]</a> and added qbs support. The following results were obtained from incremental builds of a project with 200 libraries, 50 classes per library, 30 lib-internal includes per file and 10 lib-external includes per file.</p>
<p>On my machine, doing an incremental build without any changed files with make takes</p>
<p>real 0m4.076s<br />
user 0m2.556s<br />
sys 0m1.952s</p>
<p>doing the same with qbs</p>
<p>real 0m0.843s<br />
user 0m0.724s<br />
sys 0m0.112s</p>
<h2>Build Instructions</h2>
<p>Enough talk. Where do I get it? How to build it?</p>
<p><code><br />
git clone git://gitorious.org/qt-labs/qbs.git<br />
cd qbs<br />
qmake -r qbs.pro<br />
make<br />
make docs<br />
</code></p>
<p>Please read the docs, esp. the part &#8220;configuring qbs&#8221;. You can find them online <a href="http://doc-snapshot.qt-project.org/qbs/">here</a>. Then you can start playing around with the example projects in qbs/tests/manual. If you are more in search of a real-world project, you can find qbs project files for Qt Creator <a href="http://codereview.qt-project.org/16019">right here</a>.</p>
<p>The project is open for contributions. Please see <a href="http://wiki.qt-project.org/Setting_up_Gerrit">&#8220;Setting up Gerrit&#8221;</a> on the Qt Project&#8217;s wiki for instructions. The URL of the gerrit remote is &lt;Gerrit/Jira username&gt;@codereview.qt-project.org:qt-labs/qbs.<br />
The project&#8217;s mailinglist can be found at <a href="http://lists.qt-project.org/mailman/listinfo/qbs">http://lists.qt-project.org/mailman/listinfo/qbs</a></p>
<h2>Outlook</h2>
<p>The state of this project is experimental. It is meant as a playground for different build tool concepts. Qmake will still be around for a long time, and nobody will force you to use qbs or any other build tool &#8211; though of course we will probably try to push qbs for Qt&#8217;s own build system at some point.</p>
<p>Users of common meta build tools like CMake or the GNU Autotools may have noticed that a crucial part is missing if qbs is meant to seriously compete in the cross-platform build tool market: adapting to the host environment, aka configure checks. For the time being it is still necessary to use an external configure script to generate a JSON file for qbs&#8217; use, but that is of course not meant to be the long-term solution. The idea is to make configure tests usable like other modules. Their implementation will of course not be purely declarative, but will contain some JavaScript code.</p>
<p>There is plenty to do! For a non-exhaustive list of ideas, see our <a href="https://bugreports.qt-project.org/secure/IssueNavigator.jspa?reset=true&#038;jqlQuery=project+%3D+QBS+AND+resolution+%3D+Unresolved+ORDER+BY+key+ASC%2C+priority+DESC">issue tracker</a> (once our admins configure public access to the product).</p>
<h2>References</h2>
<p><a href="http://aegis.sourceforge.net/auug97.pdf">[RMCH]</a> Peter Miller (1998), &#8220;Recursive Make Considered Harmful&#8221;, AUUGN Journal of AUUG Inc., 19(1), pp. 14-25<br />
<a href="http://labs.qt.nokia.com/2009/10/12/to-make-or-not-to-make-qmake-and-beyond/">[TMQB]</a> Marius Storm-Olsen (2009), &#8220;To make, or not to make &#8211; QMake and beyond&#8221;, http://labs.qt.nokia.com/2009/10/12/to-make-or-not-to-make-qmake-and-beyond/<br />
<a href="http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-June/000494.html">[WNCM]</a> http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-June/000494.html<br />
<a href="http://gamesfromwithin.com/the-quest-for-the-perfect-build-system">[QPBS]</a> Noel Llopis (2005), &#8220;The Quest for the Perfect Build System&#8221;, http://gamesfromwithin.com/the-quest-for-the-perfect-build-system</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.qt.nokia.com/2012/02/15/introducing-qbs/feed/</wfw:commentRss>
		<slash:comments>121</slash:comments>
		</item>
	</channel>
</rss>

