<?xml version="1.0" encoding="UTF-8"?>

<rss version='2.0'
     xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">
    <channel>
        <!-- This XML Feed shows details for the page Trolltech Labs Blogs -->
        <creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/
          </creativeCommons:license>
        <title>Trolltech Labs Blogs</title>
        <description></description>
                <category>trolltech</category>

        <pubDate>Mon, 26 Feb 2007 10:58:12 -0800</pubDate>
        <lastBuildDate>Mon, 26 Feb 2007 10:58:12 -0800</lastBuildDate>
            
        <item>
            <title>QGtkStyle now part of Qt</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/QGtkStyle+now+part+of+Qt/cdtgo</link>
            <description>&lt;p&gt;QGtkStyle made it&amp;#8217;s way into the Qt snapshots this week, meaning it will become part of the Qt 4.5 release. Technical users can already compile and use it on their own desktop, but once Qt 4.5 is out it will simply replace Cleanlooks as the default application style Qt uses on GNOME desktops. While I haven&amp;#8217;t blogged about it since the &lt;a href=&quot;http://labs.trolltech.com/blogs/2008/05/13/introducing-qgtkstyle/&quot; title=&quot;introduction article&quot;&gt;announcement&lt;/a&gt; back in May, a lot of fixes and improvements have gone into it since then and I&amp;#8217;d like to thank everybody contributing bug reports, suggestions and patches to the project so far. Since the existing plugin based on Qt 4.4 seems rather popular and not everybody feel comfortable using an unstable version of Qt, I will continue to maintain it as a separate project and accept bug reports over at my &lt;a href=&quot;http://code.google.com/p/qgtkstyle/&quot;&gt;google code page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/clearlooks.png&quot; title=&quot;Clearlooks dialog&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/clearlooks.png&quot; alt=&quot;Clearlooks dialog&quot;/&gt;&lt;/a&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/glider.png&quot; title=&quot;glider theme&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/glider.png&quot; alt=&quot;glider theme&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In other news, the nice folks over at the &lt;a href=&quot;http://qt4.garage.maemo.org/&quot;&gt;Qt4 Maemo garage&lt;/a&gt; have been adapting QGtkStyle to work nicely with the Maemo platform as was evidenced by &lt;a href=&quot;http://labs.trolltech.com/blogs/2008/08/23/qt-4-on-maemo/&quot;&gt;lorn&amp;#8217;s post&lt;/a&gt; last month. Samuel also &lt;a href=&quot;http://labs.trolltech.com/blogs/2008/09/01/subpixel-antialiasing-on-x11/&quot;&gt;blogged&lt;/a&gt; about using Freetype for subpixel filtering which should eventually take care of any differences in font rendering between Qt and GTK.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 05 Sep 2008 08:01:39 -0700</pubDate>
        </item>
            
        <item>
            <title>Code portability</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Code+portability/cdphu</link>
            <description>&lt;p&gt;Today I was reminded of this great TV show that ran when I grew up; it was Hannibal saying &amp;#8220;I love it when a plan comes together&amp;#8221;.&lt;/p&gt;
&lt;p&gt;In this show you often saw the various people on the team do completely separate and often just weird things and in the end you saw how the result could be combined to be a really cool thing. I felt a bit like that today because today Marijn &lt;a href=&quot;http://www.kdedevelopers.org/node/3662&quot;&gt;blogged&lt;/a&gt; about a big milestone. He managed to get various applications from &lt;a href=&quot;http://www.koffice.org&quot;&gt;KOffice&lt;/a&gt; running natively on the Nokia n810, a Maemo device.&lt;/p&gt;
&lt;p&gt;And this has been a team effort, for sure. The fact that you can use the exact same sourcecode to now run this office suite without code changes on Windows, Macintosh, Solaris, Linux and indeed an embedded device like the Maemo is because there has been an amazing framework we can depend on. Almost all of it available open source. As KOffice itself is as well.&lt;br/&gt;
Just for getting a mental picture here, we are talking about having the Linux Kernel, the window system, Qt naturally, KDELibs and last KOffice.&lt;/p&gt;
&lt;p&gt;So today I would like to say Thank You to the people that regularly compile and fix issues on all of these platforms. This goes to the people working on Qt but much more really to the people doing the same for KDE and KOffice. You Rock!&lt;/p&gt;
</description>
            
            <pubDate>Thu, 04 Sep 2008 07:02:27 -0700</pubDate>
        </item>
            
        <item>
            <title>Subpixel antialiasing on X11</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Subpixel+antialiasing+on+X11/cddak</link>
            <description>&lt;p&gt;The last week I looked at some issues regarding Qt&amp;#8217;s font rendering on X11, triggered by some bug reports comparing Qt 4&amp;#8217;s font rendering to Qt 3&amp;#8217;s and GTK&amp;#8217;s font rendering, specifically when subpixel antialiasing is enabled. When rendering fonts with subpixel antialiasing Qt asks Freetype to render into an alpha mask that is three times wider than the desired glyph size (or taller in the case of a vertical LCD display). We then convert this alpha mask into an ARGB mask based on subpixel ordering and a smoothing filter. The smoothing filter is necessary to avoid color fringes; without it the glyphs would look like this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/text_nofilter_slight1.png&quot; title=&quot;Text without smoothing filter&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/text_nofilter_slight1.png&quot; alt=&quot;Text without smoothing filter&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With the default Qt 4 smoothing filter the fonts instead look like this (slight improvement, don&amp;#8217;t you think?):&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/text_filter_slight2.png&quot; title=&quot;Text with smoothing filter&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/text_filter_slight2.png&quot; alt=&quot;Text with smoothing filter&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After doing some digging I found out that we changed the smoothing filter in the transition from Qt 3 to Qt 4 to use an interpixel as opposed to intrapixel filter. Interpixel means we do the smoothing on the subpixels directly, ignoring pixel boundaries, which is arguably more correct from a technical perspective. However, since Qt 4 was released, Freetype has added support for doing subpixel rendering and filtering itself, along with several settings for which filter to use. In Qt 4.5 we will use Freetype&amp;#8217;s filtering if available, and thus honor the lcdfilter setting in font config. Note that the filtering we use in Qt 4.4 and earlier is pretty much the same as Freetype&amp;#8217;s default filtering, but unlike before we now also support the other filtering settings. For Qt 4.5 we&amp;#8217;ve also fixed an issue where we&amp;#8217;d ignore the &amp;#8220;slight&amp;#8221; and &amp;#8220;medium&amp;#8221; hinting options in font config, leaving only &amp;#8220;full&amp;#8221; or &amp;#8220;none&amp;#8221; as the real options.&lt;/p&gt;
&lt;p&gt;One of our goals was to make Qt 4 applications with QGtkStyle have the same font rendering as native GNOME applications, but apparently there&amp;#8217;s a known issue in GNOME/Cairo/GTK that makes Cairo use the legacy filter as soon as medium or full hinting is enabled in the GNOME font settings dialog: &lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/200707&quot; title=&quot;https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/200707&quot;&gt;https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/200707&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/gnome-dialog.png&quot; title=&quot;Gnome font settings dialog - hinting&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/gnome-dialog.png&quot; alt=&quot;Gnome font settings dialog - hinting&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As the legacy smoothing filter looks really ugly with certain fonts and/or slight hinting there is no way we want to use it by default in Qt, but if you really want Qt 4&amp;#8217;s fonts to be rendered as in Qt 3, you can enable the legacy subpixel filtering as described on &lt;a href=&quot;http://johan.kiviniemi.name/blag/2008/01/12/ubuntu-hardy-fonts/&quot; title=&quot;http://johan.kiviniemi.name/blag/2008/01/12/ubuntu-hardy-fonts/ &quot;&gt;http://johan.kiviniemi.name/blag/2008/01/12/ubuntu-hardy-fonts/ &lt;/a&gt;(note it seems you might have to use the value &amp;#8220;legacy&amp;#8221; or &amp;#8220;lcdlegacy&amp;#8221; instead of &amp;#8220;lcdfilterlegacy&amp;#8221; depending on your system). Note that this can cause severe color fringes with certain fonts, while making other fonts crisper. This is how the font above looks with the legacy filter and full hinting:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/text_legacy1.png&quot; title=&quot;Text with legacy smoothing filter&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/text_legacy1.png&quot; alt=&quot;Text with legacy smoothing filter&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With the &amp;#8220;slight&amp;#8221; hinting option however it turns quite ugly (note the color fringes):&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/text_legacy_slight1.png&quot; title=&quot;Text with legacy smoothing filter and slight hinting&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/09/text_legacy_slight1.png&quot; alt=&quot;Text with legacy smoothing filter and slight hinting&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To sum up, in Qt 4.5 we should honor more of the font config settings, including lcd filter and hinting style. However, unless you explicitly change the LCD filter or hinting style things should look basically the same as in Qt 4.4. By tweaking the LCD filter and hinting settings it should be possible to get Qt applications with QGtkStyle to look even closer to native on GNOME, though hopefully the configuration issues on GNOME will be fixed eventually and you won&amp;#8217;t have to change anything to achieve this. We could of course try to mimic GNOME&amp;#8217;s behavior in Qt, but as long as there are open issues regarding this in Gtk/Cairo it doesn&amp;#8217;t make sense to change Qt&amp;#8217;s behavior.&lt;/p&gt;
&lt;p&gt;Note: all the screenshots in this article were taken on an LCD monitor with horizontal RGB subpixel ordering, and will probably look quite ugly on other display types.&lt;/p&gt;
</description>
            
            <pubDate>Mon, 01 Sep 2008 06:02:48 -0700</pubDate>
        </item>
            
        <item>
            <title>Workflow and switching to Git, part 2: The tools</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Workflow+and+switching+to+Git%2C+part+2%3A+The+tools/cc59f</link>
            <description>&lt;p&gt;In the &lt;a href=&quot;http://labs.trolltech.com/blogs/2008/08/29/workflow-and-switching-to-git-part-1-processes/&quot;&gt;first part&lt;/a&gt; of this blog, I discussed a bit the change process and the development process we&amp;#8217;re aiming for.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s interesting to realise that we&amp;#8217;re going through the same process both in KDE and Qt. It&amp;#8217;s also interesting that it&amp;#8217;s happening at the same time for both &amp;#8212; well, slightly ahead for Qt. That&amp;#8217;s not, however, a coincidence.&lt;/p&gt;
&lt;p&gt;I read a comment on the &lt;a href=&quot;http://dot.kde.org/1219926799/&quot;&gt;dot article&lt;/a&gt; about opposing a VCS switch every two years. Well, we&amp;#8217;re not switching just for the fun of switching. We&amp;#8217;re doing it because there are many compelling reasons to do so. (Also, it&amp;#8217;s been over 3 years since the Subversion switch, about 4 since we started seriously considering it; Trolltech has been using Perforce for almost 9 years)&lt;/p&gt;
&lt;p&gt;And it&amp;#8217;s happening now because the DVCS tools have matured enough that we can migrate massive repositories into it. The Qt repository right now has about 170,000 commits and is over 900 MB in size (in Git, well packed). And the KDE repositories &lt;a href=&quot;http://mail.kde.org/pipermail/kde-scm-interest/2008-August/000251.html&quot;&gt;I imported&lt;/a&gt; had 79404, 71892, 60182 commits for kdelibs, kdebase and koffice, respectively.&lt;/p&gt;
&lt;p&gt;And because the old processes and tools have become outdated. And, finally, because we&amp;#8217;re people and we talk &lt;img src=&quot;http://labs.trolltech.com/blogs/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;-)&quot; class=&quot;wp-smiley&quot;/&gt; (that is, exchange of experience and opinions)&lt;/p&gt;
&lt;h2&gt;Switching to Git&lt;/h2&gt;
&lt;p&gt;So far I have not approached the second part of my blog title. There&amp;#8217;s a very good reason for that: most of what we want to do, the workflow we want to introduce, does not depend on any specific tool. There are feature requirements that many tools do not fulfill, but many do fit the bill.&lt;/p&gt;
&lt;p&gt;So why Git, in specific?&lt;/p&gt;
&lt;p&gt;We had a lengthy process internally at Trolltech trying to decide whether we should switch to a DVCS and, if so, which tool it should be. That was a very interesting process, but one that would deserve an entire blog on the subject. We had a restricted set at the beginning, but only two serious contenders at the end: Git and Mercurial. &lt;/p&gt;
&lt;p&gt;At one point, we came up with a list of what were the criteria we were going to use to make the decision. And then we took a look at which criteria were showstoppers. At the end of the process, there was a clear winner.&lt;/p&gt;
&lt;p&gt;The most important criteria in that decision were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Quality of the conversion process (from Perforce)&lt;/li&gt;
&lt;li&gt;In-house knowledge of the tool&lt;/li&gt;
&lt;li&gt;Ability of the tool to support our proposed workflow&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While the latter criterion was a tie between Mercurial and Git, the first two is where there was a clear winner.&lt;/p&gt;
&lt;p&gt;(Disclaimer: there were other reasons, with a varying degree of importance, including some where Git lost to Mercurial)&lt;/p&gt;
&lt;p&gt;And if you look at it, those are the exact same criteria that are of importance to KDE now. Sure, there are other tools that also do the job, but who&amp;#8217;s going to do the conversion? Who&amp;#8217;s going to support and help the developers who aren&amp;#8217;t familiar with the tool?&lt;/p&gt;
&lt;p&gt;For close to a year now, we&amp;#8217;ve had the &lt;a href=&quot;https://mail.kde.org/mailman/listinfo/kde-scm-interest&quot;&gt;kde-scm-interest&lt;/a&gt; mailing list, whose mandate is to propose a plan to convert from Subversion to another VCS (or Source Control Management - SCM) and how the layout and workflow would be with this tool. Which VCS, it&amp;#8217;s not specified. Any is welcome, barring CVS (we&amp;#8217;re not going back), Subversion (it&amp;#8217;s not conversion if we stay where we are) and solutions that aren&amp;#8217;t Free and Open Source.&lt;/p&gt;
&lt;p&gt;If you inspect the archives, you&amp;#8217;ll see that there&amp;#8217;s only one contender. So far, anyways. Others are more than welcome to join and repeat the process for other tools. But mind you: you&amp;#8217;re a year behind schedule.&lt;/p&gt;
&lt;p&gt;This weekend, I finished converting the KDE Subversion repository into Git. The process created no less than 493 different repositories: I decided that each application in extragear, kdereview, kdesupport or playground should get its own repository. There will be more when I run it again.&lt;/p&gt;
&lt;p&gt;The process isn&amp;#8217;t correct yet. There are definite import errors found: for instance, Thomas Zander inspected the the KOffice repository and realised that several branches were missing. What&amp;#8217;s more, I still have a few ideas to do copy-with-history, which means preserving correctly the moves in SVN. Many of our projects originated in the old kdenonbeta, which I didn&amp;#8217;t import.&lt;/p&gt;
&lt;p&gt;I am forced to realise that Git isn&amp;#8217;t completely ready for us yet. I&amp;#8217;ve been using Git for well over a year now and I can see it improving build after build. 1.6.0 is very nice, but not there yet. So I ask the Git developer community: how do we handle 493 separate but related repositories? Mind you, we want to maintain the ability to build them all with very simple commands.&lt;/p&gt;
&lt;p&gt;So, while Git is by no means decided for KDE &amp;#8212; well advanced, I&amp;#8217;d say &amp;#8212; it is decided for Qt. We have kickstarted the process to completely switch to Git. Very soon now, we&amp;#8217;ll be in the final leg of that process and will hopefully have some news on it. Our goal is to stop using Perforce for Qt 4.5 by October 1st.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 29 Aug 2008 15:01:04 -0700</pubDate>
        </item>
            
        <item>
            <title>Workflow and switching to Git, part 1: Processes</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Workflow+and+switching+to+Git%2C+part+1%3A+Processes/cc52k</link>
            <description>&lt;p&gt;You know that with the Title I chose for this blog, I could be talking about Qt or about KDE. It&amp;#8217;s ambiguous&amp;#8230; &lt;img src=&quot;http://labs.trolltech.com/blogs/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;-)&quot; class=&quot;wp-smiley&quot;/&gt; &lt;/p&gt;
&lt;p&gt;Yesterday, &lt;a href=&quot;http://dot.kde.org&quot;&gt;the dot&lt;/a&gt; had an article about &lt;a href=&quot;http://dot.kde.org/1219926799/&quot;&gt;a new development process for KDE&lt;/a&gt; that requires the use of a Decentralised Version Control System (DVCS for short). Believe me if you will, I had nothing to do with that article: I had not talked to Jos before he published it and I even admit to not attending the talks at Akademy on the subject.&lt;/p&gt;
&lt;p&gt;But it was a pleasant surprise to read it.&lt;/p&gt;
&lt;h2&gt;Resistance to change&lt;/h2&gt;
&lt;p&gt;I&amp;#8217;ve been discussing the switch to a different VCS for KDE and for Qt for over a year now. I&amp;#8217;ve met a lot of resistance and the article on the dot was no different. There&amp;#8217;s a lot of people who oppose the idea.&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s always resistance to change. People don&amp;#8217;t do it out of malice. Quite to the contrary, they do it because resistance to change is a natural reaction. It&amp;#8217;s a way of your body and your mind letting you know you&amp;#8217;re exiting your comfort zone. And that&amp;#8217;s a natural human reaction. Brides and grooms having cold feet the morning of their wedding wouldn&amp;#8217;t be a cliché otherwise: they&amp;#8217;re about to make a life-changing decision.&lt;/p&gt;
&lt;p&gt;Really, look back to all your life-changing decisions and events in your life (gradual changes don&amp;#8217;t count). How many of those did you jump into with two feet ahead? Not many, you&amp;#8217;ll agree. Marrying, getting a new job, moving to another city or country, for example, are all life-changing decisions. Incidentally, I&amp;#8217;ve moved between countries 4 times already and only one of them (the last one) was with two feet ahead: it was when I decided to come back to Trolltech in Norway.&lt;/p&gt;
&lt;p&gt;So the resistance we&amp;#8217;re seeing now in the KDE community and inside the Trolltech (a.k.a. Qt Software in Nokia) developer community is natural. Some of the criticism is based on technical issues that have to be addressed, most is only fear that has to be managed.&lt;/p&gt;
&lt;p&gt;In fact, there&amp;#8217;s a whole profession on that, which is called Change Management.&lt;/p&gt;
&lt;h2&gt;New workflow&lt;/h2&gt;
&lt;p&gt;The article on the dot discussed the development process where &amp;#8220;It&amp;#8217;s always Summer in trunk&amp;#8221;. I don&amp;#8217;t know who coined that expression, but it&amp;#8217;s a nice one. I think it appeared in the KDE circle in a blog by &lt;a href=&quot;http://vizzzion.org/?blogentry=815&quot;&gt;Sebastian Kügler&lt;/a&gt;: he asked the question &amp;#8220;What if we never froze trunk?&amp;#8221;&lt;/p&gt;
&lt;p&gt;I was part of the discussions that led to that question, when we were discussing where Phonon would live. With my Qt hat on, I was asking for anywhere where &amp;#8220;&lt;a href=&quot;http://lists.kde.org/?l=kde-core-devel&amp;#038;m=121001697315053&quot;&gt;there&amp;#8217;s no freeze when TT developers are working on development.&lt;/a&gt;&amp;#8221;&lt;/p&gt;
&lt;p&gt;In his blog and in the article, Sebas and others are advocating this idea. It&amp;#8217;s something we already do for Qt&amp;#8217;s development: the mainline of development never freezes. The feature freezes are preceded by a branching. In KDE terms, it would be equivalent of branches/KDE/4.1 branching off trunk/KDE just before the feature freeze.&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s fine by itself, but you need the proper tools to pull it off. Remember that you&amp;#8217;re going to work extensively with two branches. To give you an idea of the work involved, from the moment that Qt 4.4 branched off the mainline until today, there were 7744 commits into the Qt 4.4 branch (2771 of which &lt;strong&gt;after&lt;/strong&gt; 4.4.0) and 9768 in the mainline (that includes the 4.4 ones). Whereas in KDELibs, there were 3783 commits to trunk since the 4.0 branch, but only 590 into the 4.0 branch since the same point. That&amp;#8217;s approximately the same time period.&lt;/p&gt;
&lt;p&gt;But the workflow goes beyond &amp;#8220;It&amp;#8217;s always Summer in trunk&amp;#8221; (we&amp;#8217;re already there with Qt and I said this blog is both about KDE and Qt). It&amp;#8217;s about doing most of the development &amp;#8212; which is where most of regressions occur, potentially &amp;#8212; in separate branches. More than that, it&amp;#8217;s about maintaining an ultra-stable branch somewhere.&lt;/p&gt;
&lt;p&gt;If development is where &amp;#8220;hot&amp;#8221; is, then I&amp;#8217;d say that actually &amp;#8220;It&amp;#8217;s always Spring in trunk&amp;#8221;. We don&amp;#8217;t want trunk to overheat &amp;#8212; even economists say overheated economies are bad (cf. China). We want it to be a self-sustaining exothermic process. Like Spring, there should be periods where it cools down a bit more, there should be periods where it&amp;#8217;s warmer than usual. &lt;/p&gt;
&lt;p&gt;(I could also have chosen Autumn, but I thought Spring made my analogy look nicer)&lt;/p&gt;
&lt;p&gt;Finally, we want developers to feel like experimenting without fear of breaking stuff. We want developers to freely collaborate with each other. And we want new developers to feel readily welcome, not second-class citizens. Granted, obtaining a KDE SVN account is rather easy, compared to many projects out there. But I&amp;#8217;ve heard from many new Qt employees who felt like their first commits were very daunting. It was my case too.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 29 Aug 2008 14:00:39 -0700</pubDate>
        </item>
            
        <item>
            <title>Data Bindings</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Data+Bindings/cc4ta</link>
            <description>&lt;p&gt;Been having some fun this week trying to add support for data bindings to Qt Script, and now I have something that seems to work. This code shows the basic usage:&lt;/p&gt;
&lt;pre&gt;
QScriptEngine engine;
QPushButton button;
QScriptValue scriptButton = engine.newQObject(&amp;#038;button);
engine.evaluate(&quot;x = &#039;foo&#039;&quot;);
scriptButton.setProperty(&quot;text&quot;, &quot;x&quot;, QScriptValue::DataBinding);
&lt;/pre&gt;
&lt;p&gt;This will cause the button&amp;#8217;s text property to be updated whenever the script variable &lt;code&gt;x&lt;/code&gt; changes, either from C++ (QScriptValue::setProperty()) or from&lt;br/&gt;
script. QObject properties can be part of the binding expression as well, as long as the NOTIFY attribute is specified in the Q_PROPERTY definition. Qt Script will discover that the property has a signal associated with it and use it to track changes. Qt&amp;#8217;s classes already use NOTIFY for some properties (e.g. QLabel::text).&lt;/p&gt;
&lt;p&gt;Below is a small example. The text property of a label is bound to the text property of a lineedit and the script variable &lt;code&gt;verb&lt;/code&gt;; the final value is made by concatenating the lineedit&amp;#8217;s text, the &lt;code&gt;verb&lt;/code&gt; and a string literal.&lt;/p&gt;
&lt;pre&gt;
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QWidget win;
    QVBoxLayout *vbox = new QVBoxLayout(&amp;#038;win);
    QLineEdit *lineEdit = new QLineEdit();
    QLabel *label = new QLabel();
    label-&gt;setStyleSheet(&quot;font-size: 24px&quot;);
    vbox-&gt;addWidget(lineEdit);
    vbox-&gt;addWidget(label);

    QScriptEngine engine;
    QScriptEngineDebugger debugger;
    debugger.attachTo(&amp;amp;engine);
    vbox-&gt;addWidget(debugger.widget(QScriptEngineDebugger::ConsoleWidget));

    QScriptValue scriptLineEdit = engine.newQObject(lineEdit);
    engine.globalObject().setProperty(&quot;lineEdit&quot;, scriptLineEdit);
    QScriptValue scriptLabel = engine.newQObject(label);
    engine.globalObject().setProperty(&quot;label&quot;, scriptLabel);

    engine.evaluate(&quot;verb = &#039;smack&#039;&quot;);
    scriptLabel.setProperty(&quot;text&quot;, &quot;lineEdit.text + &#039; &#039; + verb + &#039;s you!&#039;&quot;, QScriptValue::DataBinding);

    win.show();

    return app.exec();
}
&lt;/pre&gt;
&lt;p&gt;The result, after typing something into the lineedit and assigning something to &lt;code&gt;verb&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;
&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/databinding.png&quot; alt=&quot;Qt Script data binding example&quot;/&gt;
&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve also added an extension to &lt;a href=&quot;http://doc.trolltech.com/latest/qscriptclass.html&quot;&gt;QScriptClass&lt;/a&gt; that enables you to send property change notifications for custom (non-QObject-based) script objects, i.e. you can use your own notify mechanism.&lt;/p&gt;
&lt;p&gt;As I said, this isn&amp;#8217;t in Qt yet, it&amp;#8217;s just an experiment, but it&amp;#8217;s looking pretty interesting.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 29 Aug 2008 08:00:57 -0700</pubDate>
        </item>
            
        <item>
            <title>Rant: Desktop effects? Never more.</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Rant%3A+Desktop+effects%3F+Never+more./cc3zy</link>
            <description>&lt;p&gt;Disclaimer: this is a rant. I have been trying for the past few days to make desktop effects work and not use 90% of my CPU. I am frustrated, so this blog will step on people&amp;#8217;s toes. Maybe you shouldn&amp;#8217;t read it.&lt;/p&gt;
&lt;p&gt;I remember when I was using KDE 3 and I enabled the desktop effects. The only objective of that was to have semi-transparent windows: I had just got a collection of nice wallpaper pictures, but what&amp;#8217;s the use if you never see the desktop? So I turned the feature on, and it worked &amp;#8212; more or less. There was a nice feature which you could set the transparency level differently for active and inactive windows, but once you clicked the Windows Operations menu (Alt+F3, the application icon in the top-left corner), the transparency level would become stuck for that window. To make matters worse, there was this one application that, if moved, would become 100% transparent. I had to be careful to change the level just after starting it, before doing anything in it.&lt;/p&gt;
&lt;p&gt;But that wasn&amp;#8217;t too big a deal. After all, kwin in KDE 3 was never meant to have those effects. They were hackish.&lt;/p&gt;
&lt;p&gt;Come KDE 4&amp;#8230; I decided to continue using the desktop effects. After all, now kwin was &lt;strong&gt;meant&lt;/strong&gt; to have those effects. The drawback was that kwin constantly used 40-90% CPU time, while doing absolutely nothing. I mean, the computer was idle, no windows had any activity, but it still would use CPU. Konsole takes 20 seconds to redraw if you try to resize the window. And to make matters worse, I can&amp;#8217;t use my wallpaper collection, because the slideshow mode always expands the pictures without considering the aspect ratio.&lt;/p&gt;
&lt;p&gt;Someone in the office told me that XRender worked just as well, but without the CPU overhead. I have no idea why, but I just can&amp;#8217;t set that mode. Trying to change from OpenGL to XRender makes the entire desktop freeze: the helpful &amp;#8220;you&amp;#8217;ve changed configurations, do you want to keep them&amp;#8221; dialog with a 15-second automatic cancellation doesn&amp;#8217;t even appear. But it does cancel, so it goes back to OpenGL. Trying to enable desktop effects with XRender gives me a message that it didn&amp;#8217;t work and the old configuration was restored.&lt;/p&gt;
&lt;p&gt;I tried to debug kwin. Only to find out that you shouldn&amp;#8217;t do it from inside the X session. Everything freezes just after you press Enter on the &amp;#8220;attach&amp;#8221; line on gdb. So I switched to a virtual console, managed to attach to kwin, but the backtrace was useless due to glib appearing in the middle. Debugging the timers with glib is too difficult &amp;#8212; the Qt default event dispatcher is easier.&lt;/p&gt;
&lt;p&gt;So I restart kwin without glib (&lt;tt&gt;QT_NO_GLIB=1 kwin &amp;#8211;replace&lt;/tt&gt;). Only to find out that that doesn&amp;#8217;t work. It took me a few tries doing that and doing &lt;tt&gt;killall kwin&lt;/tt&gt; to get a new kwin running. And to my surprise, I couldn&amp;#8217;t find anything wrong with kwin under those conditions. Thinking I had done something wrong, I restarted KDE with glib turned off. And my suspicion was confirmed: turning glib off makes kwin use acceptable 1% CPU.&lt;/p&gt;
&lt;p&gt;Performance was still bad, though. I mean, what&amp;#8217;s the point of having windows flying by when you switch desktops if all you get is two frames?&lt;/p&gt;
&lt;p&gt;On Wednesday, Sebas &lt;a href=&quot;http://vizzzion.org/?blogentry=829&quot;&gt;blogged&lt;/a&gt; about NVidia releasing a new driver that fixed most of the performance issues. So I decided I would try, and I&amp;#8217;d also try the many settings that presumably make performance better. So I downloaded version 177.67, built and installed; changed my &lt;tt&gt;xorg.conf&lt;/tt&gt; to add the options that Sebas recommended; and restarted X. And for a while it appeared to be working correctly.&lt;/p&gt;
&lt;p&gt;Until some Konsole windows started disappearing. No, wait, they weren&amp;#8217;t crashing or off-screen: they were just invisible. Yes, 100% transparent. I could even interact with them, but I couldn&amp;#8217;t see what was wrong. So&amp;#8230; undo some of the modifications to &lt;tt&gt;xorg.conf&lt;/tt&gt; and restart X.&lt;/p&gt;
&lt;p&gt;Problem not gone. And to make it worse, some other windows started appearing black. Including the window decoration (borders, title bar, buttons). I assume it&amp;#8217;s the same problem affecting konsole, with the difference that konsole uses windows with alpha channels, thus making it go invisible instead of black. The interesting thing is that, when moving windows (I had an effect on to make them more transparent), the black window became slightly transparent! I managed to get most of the windows appearing when I minimise then restore the window. Not all, though (including one program I need for work).&lt;/p&gt;
&lt;p&gt;So I try fiddle with my settings. I ran &lt;tt&gt;nvidia-settings&lt;/tt&gt; to find out if I were using the correct driver. And to my surprise after starting that program, all windows stopped updating! Actually, they were updating, but I wasn&amp;#8217;t seeing them. If I clicked on another window, the window that had just become deactivated would update. So, yeah, I found a new interesting effect: freeze until focus lost.&lt;/p&gt;
&lt;p&gt;Turning desktop effects off and back on helped. I had to do it twice because the second screen on my Twin View setup doesn&amp;#8217;t enable the effects on the first try.&lt;/p&gt;
&lt;p&gt;Come today: I&amp;#8217;m told that NVidia released a new version, 177.68, which fixes some bugs. So I go and upgrade the driver. And indeed things feel snappier. I can see the effects as they are meant to look like. However, the black windows don&amp;#8217;t go away.&lt;/p&gt;
&lt;p&gt;I tried using &lt;tt&gt;nvidia-settings&lt;/tt&gt; again. And a similar problem as yesterday started appearing. Only even worse than &amp;#8220;redraw when focus lost&amp;#8221;. I could see the screen repainting from top to bottom, scan line by scan line. It took about 5 seconds (1680&amp;#215;1050). I don&amp;#8217;t think I&amp;#8217;ve seen that happen since CGA was the norm!&lt;/p&gt;
&lt;p&gt;Turning effects off and then back on (twice) fixed that problem.&lt;/p&gt;
&lt;p&gt;But the black windows are still appearing. To almost all programs (konqueror, vmware-server-console, hooligan, etc.). Apparently Emacs isn&amp;#8217;t affected.&lt;/p&gt;
&lt;p&gt;So my solution? Turn effects off. I need to work. I can&amp;#8217;t fight my system. After all, the whole point of the effects is to &lt;strong&gt;improve&lt;/strong&gt; my user experience, not to make it worse. And I can&amp;#8217;t use wallpapers anyways&amp;#8230;&lt;/p&gt;
&lt;p&gt;And if that weren&amp;#8217;t enough, one or several &lt;tt&gt;kio_imap4&lt;/tt&gt; became runaway, printing a debug message from &lt;tt&gt;KIO::SlaveBase::waitForAnswer&lt;/tt&gt; in an infinite loop. That exhausted my disk space in my &lt;tt&gt;/home&lt;/tt&gt; filesystem, thereby making Kontact crash and lose all of its settings. I&amp;#8217;m still synchronising my IMAP folders as I write this&amp;#8230;&lt;/p&gt;
&lt;p&gt;At least one good thing came out of this ordeal: I found out why kwin consumes so much CPU. If you&amp;#8217;re affected by this problem, turn glib support off in Qt. (&lt;tt&gt;export QT_NO_GLIB=1&lt;/tt&gt; before KDE is started, or compile Qt with the &lt;tt&gt;-no-glib&lt;/tt&gt; option)&lt;/p&gt;
&lt;p&gt;By the way, Konsole still lags in drawing, even with desktop effects turned off. That means it&amp;#8217;s not caused by the desktop effects.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 29 Aug 2008 03:59:10 -0700</pubDate>
        </item>
            
        <item>
            <title>Qt 4 on maemo</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Qt+4+on+maemo/cc3zx</link>
            <description>&lt;p&gt;I love Qt, which is one reason I work for Trolltech^WQtsoftware in Nokia. and thanks to the efforts of the qt4 on maemo project &lt;a href=&quot;http://qt4.garage.maemo.org/&quot;&gt;Maemo Qt4&lt;/a&gt;, there is yet another platform/device open to any application that is created with Qt4.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/2008/08/23/qt-4-on-maemo/gutenbrowser-on-maemo/&quot; rel=&quot;attachment wp-att-805&quot; title=&quot;gutenbrowser on maemo&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/screenshot-2008-08-23-06-17-59.png&quot; alt=&quot;gutenbrowser on maemo&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is my old-yet-updated Gutenbrowser project on Maemo on n810. (the copyright on gutenbrowser is 1998-2008! now). I don&amp;#8217;t work on it as much as it needs. Especially now with rug rats and yard apes about.&lt;/p&gt;
&lt;p&gt;All it took was a recompile! &lt;/p&gt;
&lt;p&gt;Just install the scratchbox sdk for maemo. Grab the qt4 for Maemo sources, compile, install them, and your good to go! hmmm&amp;#8230; what&amp;#8217;s &lt;a href=&quot;http://qt-apps.org/&quot;&gt;next&lt;/a&gt;?&lt;/p&gt;
</description>
            
            <pubDate>Fri, 29 Aug 2008 03:59:10 -0700</pubDate>
        </item>
            
        <item>
            <title>Unifying JavaScript Argument-passing Styles</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Unifying+JavaScript+Argument-passing+Styles/cc3zw</link>
            <description>&lt;p&gt;At Akademy (which was a great event by the way!) I had an interesting talk with Pino (the man with Okular vision &lt;img src=&quot;http://labs.trolltech.com/blogs/wp-includes/images/smilies/icon_cool.gif&quot; alt=&quot;8-)&quot; class=&quot;wp-smiley&quot;/&gt; ) about an almost equally interesting feature of the &lt;a href=&quot;http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf&quot;&gt;Adobe Acrobat JavaScript API&lt;/a&gt;. Quoting the reference:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
Many of the JavaScript methods provided by Acrobat accept either a list of arguments, as is customary in JavaScript, or a single object argument with properties that contain the arguments. For example, these two calls are equivalent:&lt;/p&gt;
&lt;pre&gt;
app.alert(&quot;Acrobat Multimedia&quot;, 3);

app.alert( { cMsg: &quot;Acrobat Multimedia&quot;, nIcon: 3 } );
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;p&gt;The second form uses JavaScript&amp;#8217;s object literal syntax to provide arguments in a declarative style, which can make for more readable code, and relieves the script author of having to worry about the order of arguments. However, it does present a new challenge to the implementer of the API: Does he have to implement every function twice now, once per argument-passing style?&lt;/p&gt;
&lt;p&gt;Short answer: No (and that&amp;#8217;s the honest truth). Long answer: Read on.&lt;/p&gt;
&lt;p&gt;What we&amp;#8217;ll do is wrap a proxy function around the function that implements the API; the job of the proxy is to detect which particular argument-passing style is used in an invocation, and call the real function using a single argument-passing style regardless (i.e. convert the object literal to a list or vice versa). Essentially we are building our own little type system on top of barebones JS. Sure, this means that some additional glue code has to be written for initializing the JS bindings, and there will be a slight overhead involved with calling a public API function, but I believe in most cases that&amp;#8217;s a small price to pay, considering the alternative. The solution presented works on a per-function basis anyway, so you don&amp;#8217;t have to use it for everything.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve written a small JavaScript function, called argumentative(), that does the work; you can download it &lt;a href=&quot;http://chaos.troll.no/~khansen/argumentative.js&quot;&gt;here&lt;/a&gt;. To use it, you first prepare your own &amp;#8220;private&amp;#8221; implementations of the API in whatever call-style you wish, for example list-style:&lt;/p&gt;
&lt;pre&gt;
function __alert(msg, icon, type, title, doc, checkbox)
{
    // For now we just dump the arguments, a real implementation
    // would display a message box.
    print(&quot;msg:&quot;, msg, &quot;icon:&quot;, icon, &quot;type:&quot;, type);
    print(&quot;title:&quot;, title, &quot;doc:&quot;, doc, &quot;checkbox:&quot;, checkbox);
}
&lt;/pre&gt;
&lt;p&gt;Then you call argumentative(), passing it your function, and an array of &lt;em&gt;argument descriptors&lt;/em&gt;. argumentative() will return a proxy function, which is the function you actually want to expose to script authors (i.e. your public API).&lt;/p&gt;
&lt;pre&gt;
alert = argumentative(__alert,
    [ { name: &#039;cMsg&#039;, type: String },
      { name: &#039;nIcon&#039;, type: Number, defaultValue: 0 },
      { name: &#039;nType&#039;, type: Number, defaultValue: 0 },
      { name: &#039;cTitle&#039;, type: String, defaultValue: &#039;Adobe Acrobat&#039; },
      { name: &#039;oDoc&#039;, type: Object, optional: true },
      { name: &#039;oCheckbox&#039;, type: Object, optional: true,
        properties: [ { name: &#039;cMsg&#039;, type: String, defaultValue: &#039;Do not show this message again&#039; },
                          { name: &#039;bInitialValue&#039;, type: Boolean, defaultValue: false } ]
      }
    ]);
&lt;/pre&gt;
&lt;p&gt;The purpose of the &lt;code&gt;name&lt;/code&gt; property of an argument descriptor should be obvious. The &lt;code&gt;type&lt;/code&gt; property is optional; if it is specified, the proxy function will check that the actual argument is of the specified type before invoking your function; this means you can potentially get rid of a lot of type checks in your own code. (The type-checking approach is inspired by John Resig&amp;#8217;s strict() function, found in his book &amp;#8220;Pro JavaScript Techniques&amp;#8221;.) The &lt;code&gt;defaultValue&lt;/code&gt; property is optional; if it is specified, its value will be used if the argument is missing in a call. Descriptors for object-based types can additionally specify a &lt;code&gt;properties&lt;/code&gt; property, which is just another array of argument descriptors; the proxy function will recursively validate the properties of the object, and substitute in default values if appropriate, before calling your function.&lt;/p&gt;
&lt;p&gt;Anyway, now the script author can either do:&lt;/p&gt;
&lt;pre&gt;
alert(&quot;my message&quot;, 1, 2, &quot;my title&quot;, null, { cMsg: &quot;check&quot;, bInitialValue: false } );
&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre&gt;
alert( { cMsg: &quot;my message&quot;, nIcon: 1, nType: 2, cTitle: &quot;my title&quot;,
          oDoc: null, oCheckbox: { cMsg: &quot;check&quot;, bInitialValue: false } } );
&lt;/pre&gt;
&lt;p&gt;To your implementation, the two calls will appear identical. (By the way, the argumentative() function lets you control which style you want to receive the arguments in; if you pass 1 as the third argument, your function will receive arguments single-argument-object style, instead of as a list.) If the script author does this:&lt;/p&gt;
&lt;pre&gt;
alert();
alert( { } );
&lt;/pre&gt;
&lt;p&gt;in both cases he will get an error saying that the &lt;code&gt;cMsg&lt;/code&gt; argument is missing, as expected. Similarly, if he does this:&lt;/p&gt;
&lt;pre&gt;
alert( { cMsg: &quot;my message&quot;, oCheckbox: { cMsg: &quot;check&quot;, bInitialValue: &quot;ciao&quot; } } );
&lt;/pre&gt;
&lt;p&gt;he will get an error saying that the argument &lt;code&gt;oCheckbox.bInitialValue&lt;/code&gt; has the wrong type.&lt;/p&gt;
&lt;p&gt;In the case of the Adobe JS bindings, the argumentative() function could also easily be augmented to support the special &lt;code&gt;acrohelp&lt;/code&gt; argument (in which case the function should return a list of its own arguments, rather than call the real function); the function proxy already has all the information it needs.&lt;/p&gt;
&lt;p&gt;OK, now for the Qt Script-related part (I almost forgot this is a Qt blog). Most, if not all, JS API functions like those for Acrobat (including alert()) have to be implemented as native functions. So how can you take advantage of the argumentative() functionality in this case? It&amp;#8217;s actually pretty simple, as demonstrated by the following C++ snippet:&lt;/p&gt;
&lt;pre&gt;
QScriptEngine engine;
/* evaluate argumentative.js
 ... ... */

QScriptValue descriptors = engine.evaluate(/* the same array of descriptors defined in an earlier snippet */);
QScriptValue fun = engine.newFunction(alert); // alert is a function pointer
QScriptValue proxy = eng.evaluate(&quot;argumentative&quot;)
                    .call(QScriptValue(), QScriptValueList() &amp;lt;&amp;lt; fun &amp;lt;&amp;lt; descriptors);
engine.globalObject().setProperty(&quot;alert&quot;, proxy); // install the public API function
&lt;/pre&gt;
&lt;p&gt;The full example can be downloaded &lt;a href=&quot;http://chaos.troll.no/~khansen/argumentative.tar.gz&quot;&gt;here&lt;/a&gt;; it&amp;#8217;s a partial implemention of the alert() function using a proper Qt message box, and shows that the native function works the same regardless of which argument-passing style the script uses.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 29 Aug 2008 03:59:10 -0700</pubDate>
        </item>
            
        <item>
            <title>WebKit on Windows CE</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/WebKit+on+Windows+CE/cc3zv</link>
            <description>&lt;p&gt;I want to introduce a feature that we&amp;#8217;ve been asked for over and over: QtWebKit on Windows CE. Its still in the works but already in a quite usable state. Eventually its possible to create your own applications with web browsing capabilities on your favourite Windows CE device!&lt;/p&gt;
&lt;p&gt;To give QtWebKit for Windows CE a whirl, you can fetch the current source from the QtWebKit git repository. So make sure that you have the following software installed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; Qt for Windows CE
&lt;/li&gt;
&lt;li&gt; Git for getting the source
&lt;/li&gt;
&lt;li&gt; Perl for calling the build script
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;First of all, download the source code:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
git clone git://code.staikos.net/webkit&lt;br/&gt;
git checkout -b wince origin/joerg/wince-master
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;You now should have a local branch called wince, which is based on the remote Windows CE branch. Then you must set up your environment to build Qt for Windows CE applications.&lt;br/&gt;
This could look like this:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
call vsvars32&lt;br/&gt;
set QTDIR=c:\Qt\4.4.1&lt;br/&gt;
set PATH=%QTDIR%\bin;%PATH%&lt;br/&gt;
setcepaths wince-mymakespec
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Go into your WebKit directory and call the build script:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
perl WebKitTools\Scripts\build-webkit
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;If everything goes well, you will find in WebKitBuild\Release\bin a QtWebKit4.dll and QtLauncher.exe. Deploy these files to your device (with the Qt binaries including network and image plugins), run it and browse the web!&lt;/p&gt;
&lt;p&gt;For Windows CE 5 I strongly recommend to build a smaller Qt version, tailored to your needs. Remember that you only have 32 MB memory per process which is pretty soon filled if you&amp;#8217;re displaying web sites with many images or animations.&lt;/p&gt;
&lt;p&gt;Try it, have fun and use the mailing list qt-wince-interest@trolltech.com if you have questions or comments.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 29 Aug 2008 03:59:10 -0700</pubDate>
        </item>
            
        <item>
            <title>font anatomy</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/font+anatomy/cc3zu</link>
            <description>&lt;p&gt;For the last 5 years a huge focus of my work has been on fonts and text. You know you went to far when you can tell the difference between a Helvetica and an Arial by just looking at the printed &amp;#8216;a&amp;#8217;.&lt;br/&gt;
Its unsurprising that people end up asking me what the difference is between leading and linespacing, why the customer claims we don&amp;#8217;t do kerning for that specific font, why WYSIWYG actually fails for most people. I naturally can&amp;#8217;t be because I&amp;#8217;m the only one stupid enough to claim to know this, right?&lt;br/&gt;
I considered claiming ignorance, but then my weird behavior may no longer have any reason, so that would just make me a worse freak. Instead I just wrote an application that shows everyone how text works. And I&amp;#8217;ll write a blog or two about what you can see on screen and how that relates to your questions even before you have them. Genius or what?&lt;br/&gt;
So, here is an example text;&lt;br/&gt;
&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/fontanatomy1.png&quot; alt=&quot;fontanatomy1.png&quot;/&gt;&lt;br/&gt;
 let me quickly go over the different parts. In red we have the outline, this is the total amount of space that the text takes. This is what is reserved in your user interface for the text. The sizes you see on the right hand side are the major anatomical dividers of a font face. Much like your body has a head and legs (I&amp;#8217;m making assumptions about that, work with me). The baseline is the only one that is really interesting to point out. it&amp;#8217;s the zero-point for a font. All measurements start from there. So you have a part that&amp;#8217;s above and a part that&amp;#8217;s below the baseline. I&amp;#8217;ll leave it to your imagination to mirror that to your own anatomy.&lt;br/&gt;
In blue we have the size taken by the individual characters. But when we are talking about fonts we actually should be talking about glyphs. There are subtle differences, but I won&amp;#8217;t bore you with that. Each glyph has its own rectangle as you can see in the blue. This is useful to see since the m is wider than the j, which is useful to know since you position the characters next to each other. The blue little gradients are helpers (called bearings) to position the glyphs better so they visually look more pleasing.&lt;/p&gt;
&lt;p&gt;Ok, with the basics behind you here are a bit more interesting things; consider the two following screenshots.&lt;br/&gt;
&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/fontanatomy2.png&quot; title=&quot;fontanatomy2.png&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/fontanatomy2.png&quot; alt=&quot;fontanatomy2.png&quot;/&gt;&lt;/a&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/fontanatomy3.png&quot; title=&quot;fontanatomy3.png&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/fontanatomy3.png&quot; alt=&quot;fontanatomy3.png&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The only difference is that kerning is turned on for the first and turned off for the second. Notice how the blue boxes overlap in the first image and how they are simply placed side by side in the second.&lt;br/&gt;
In general you want kerning to be turned on, its on by default in Qt because it increases readability.&lt;/p&gt;
&lt;p&gt;Last example; this one is tricky.&lt;br/&gt;
&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/fontanatomy4.png&quot; title=&quot;fontanatomy4.png&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/fontanatomy4.png&quot; alt=&quot;fontanatomy4.png&quot;/&gt;&lt;/a&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/fontanatomy5.png&quot; title=&quot;fontanatomy5.png&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/fontanatomy5.png&quot; alt=&quot;fontanatomy5.png&quot;/&gt;&lt;/a&gt;&lt;br/&gt;
 Fonts are designed in a way that they can be scaled and reused for any size. Which is a pretty neat idea since it avoids using a crystal ball to figure out which sizes to ship your font in. There is a little problem, though. A font that is printed on paper at 10cm per character needs a lot of detail but if you use the same character at on screen at just a couple of millimeters height, you have problems to make that one look good.&lt;br/&gt;
So, font makers ship something called &amp;#8216;hints&amp;#8217;. Which make their fonts look better at smaller sizes then the computer could do automatically. This is enabled per default and is practically speaking exactly what you want.&lt;br/&gt;
Except for one problem; if you add all those little adjustments they can add up. So much that if you have a sentence you can have a word that fits just fine when you show the font on screen, but if you then take the same width and same text but on paper, those little adjustments may just move a word to the next line.&lt;br/&gt;
In other words; hinting gets in the way of what you see is what you get text-layout. So, in Qt you can turn this off. Allowing you to get the exact same line-breakings on screen as you get on paper.&lt;br/&gt;
Look at the following two screenshots. You will see a little spacing between the little blue squares in the one where the hinting is turned off. We call this mode &amp;#8216;designer metrics&amp;#8217;.&lt;br/&gt;
if you want to play around with this stuff yourself, here you can find the sources;&lt;/p&gt;
&lt;pre&gt;svn checkout svn://labs.trolltech.com/svn/graphics/fontAnatomy&lt;/pre&gt;
&lt;p&gt;For the people that are still here, thanks for sharing the pain! And I&amp;#8217;ll answer the question of &amp;#8220;why should I care!&amp;#8221;. The concepts shown in this blog have good support in Qt4. The point to take home is that the font is the one that specifies all the information. If the font doesn&amp;#8217;t have kerning, game over. If the font has horrible sizing information, you are out of luck. With this little tool at least you can see the differences that different fonts make.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 29 Aug 2008 03:59:10 -0700</pubDate>
        </item>
            
        <item>
            <title>Allright</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Allright/cc3zt</link>
            <description>&lt;p&gt;Over the past few months, many of us trolls have had the pleasure of meeting groups of enthusiastic Nokians. Everybody is excited about Qt. It feels a bit overwhealming sometimes, different people have different expectations as to what a small group of people can do. Excitement, expectations, concerns. Enthusiasm! But the whole progress is easier when you get to meet peers that are, yeah, quite allright people. That&amp;#8217;s what makes the whole job worth it for me. Set aside technical trouble and new procedures (which quite frankly aren&amp;#8217;t as scary as I first thought!). Who&amp;#8217;s doing what now and how will this work? Then someone comes over and shows you a layout they wrote. How they used scripting, widgets. Wrote plugins. Can you do this? Can you do that? Yeah, you know, you usually can.&lt;/p&gt;
&lt;p&gt;So walking to work today, I found myself fumbling in my pocket, pulling out the Nokia-badge that we now all wear, and putting it on right when I went out of the subway station. It felt allright.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 29 Aug 2008 03:59:10 -0700</pubDate>
        </item>
            
        <item>
            <title>Fun with D-Bus at Akademy</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Fun+with+D-Bus+at+Akademy/ccd58</link>
            <description>&lt;p&gt;To summarize my achievement at Akademy:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[Argument: a{sv} {&quot;a&quot; = [Variant(int): 1], &quot;b&quot; = [Variant(QByteArray): {99}], &quot;c&quot; = [Variant(QString): &quot;b&quot;], &quot;d&quot; = [Variant(uint): 42], &quot;date&quot; = [Variant: [Argument: (iii) 1977, 1, 1]], &quot;datetime&quot; = [Variant: [Argument: ((iii)(iiii)i) [Argument: (iii) 0, 0, 0],[Argument: (iiii) 8, 59, 31, 0], 0]], &quot;dtlist&quot; = [Variant: [Argument: a((iii)(iiii)i) {[Argument: ((iii)(iiii)i) [Argument: (iii) 0, 0, 0], [Argument: (iiii) -1, -1, -1, -1], 0], [Argument: ((iii)(iiii)i) [Argument: (iii) 1977, 9, 13], [Argument: (iiii) 0, 0, 0, 0], 0], [Argument: ((iii)(iiii)i) [Argument: (iii) 2006, 6, 18], [Argument: (iiii) 13, 14, 0, 0], 0]}]], &quot;e&quot; = [Variant(short): -47], &quot;f&quot; = [Variant: [Variant(int): 0]], &quot;ismap&quot; = [Variant: [Argument: a{is} {-47 = &quot;c&quot;, 1 = &quot;a&quot;, 2000 = &quot;b&quot;}]], &quot;lldtmap&quot; = [Variant: [Argument: a{x((iii)(iiii)i)} {0 = [Argument: ((iii)(iiii)i) [Argument: (iii) 0, 0, 0], [Argument: (iiii) -1, -1, -1, -1], 0], 1 = [Argument: ((iii)(iiii)i)[Argument: (iii) 1970, 1, 1], [Argument: (iiii) 0, 0, 1, 0], 1], 1150629776 = [Argument: ((iii)(iiii)i) [Argument: (iii) 2006, 6, 18], [Argument: (iiii) 11, 22, 56, 0], 1]}]], &quot;pointf&quot; = [Variant: [Argument: (dd) 0.5, -0.5]], &quot;ssmap&quot; = [Variant: [Argument: a{ss} {&quot;a&quot; = &quot;a&quot;, &quot;b&quot; = &quot;c&quot;, &quot;c&quot; = &quot;b&quot;}]], &quot;time&quot; = [Variant: [Argument: (iiii) 8, 58, 0, 0]]}]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Looks scary? It&amp;#8217;s supposed to. D-Bus supports recursive complex types like structures, maps or variants, and until now, neither the Qt D-Bus viewer (part of Qt&amp;#8217;s demos) nor the qdbus command line client were able to dump the contents of complex arguments. So, one day of hacking later, and thanks to a small API addition from Mr. QtDBus Thiago, we can now show pretty much everything that comes through the bus. The above example shows the output of one of our D-Bus tests - you can find complex structures inside variants and complex structs inside maps, and everything is nicely dumped.&lt;/p&gt;
&lt;p&gt;But don&amp;#8217;t worry - not many interfaces use deep nesting. Why we started to write the code in the first place is to display rectangles (4 integers in a D-Bus structure) from Qt&amp;#8217;s &lt;a href=&quot;http://labs.trolltech.com/page/Projects/Accessibility/QDBusBridge&quot;&gt;D-Bus accessibility&lt;/a&gt;, &lt;a href=&quot;http://decibel.kde.org/&quot;&gt;Decibel&amp;#8217;s&lt;/a&gt; properties (a D-Bus map structure) or some of the more complex calls of &lt;a href=&quot;http://telepathy.freedesktop.org/&quot;&gt;Telepathy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The code will be available in Qt 4.5&amp;#8217;s snapshots, happy introspecting!&lt;/p&gt;
&lt;p&gt;P.S.: Many, many thanks to the organizers of this year&amp;#8217;s Akademy. As always, it&amp;#8217;s a great pleasure to be here.&lt;/p&gt;
</description>
            
            <pubDate>Wed, 13 Aug 2008 09:07:37 -0700</pubDate>
        </item>
            
        <item>
            <title>too much Qt going on!</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/too+much+Qt+going+on%21/cbst4</link>
            <description>&lt;p&gt;A great deal of things are happening for Qt right now. Very exciting news:&lt;br/&gt;
&lt;a href=&quot;http://browser.garage.maemo.org/news/10/&quot;&gt;Qt frontend for Mozilla engine&lt;/a&gt; (or, rather, has finally been dusted off and updated) Now we have two of the best browser backends to choose from. (or three if you want to use that ActiveX thing)&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://blogs.forum.nokia.com/blog/kate-alholas-forum-nokia-blog/maemo/2008/08/03/nokia-gives-out-free-n810-devices-to-developers-in-akademy-2008&quot;&gt;Nokia gives out free N810 devices to developers in Akademy 2008&lt;/a&gt;. Wow, thats a heap of n810&amp;#8217;s to throw around.&lt;/p&gt;
&lt;p&gt;Too bad Kate forgot to mention the other talks from Nokia:  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Harald - &lt;a href=&quot;http://akademy.kde.org/conference/presentation/33.php&quot;&gt;Programming for embedded Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Andreas - &lt;a href=&quot;http://akademy.kde.org/conference/presentation/22.php&quot;&gt;How Graphics View Works&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Simon - &lt;a href=&quot;http://akademy.kde.org/conference/presentation/25.php&quot;&gt;QtWebKit&lt;/a&gt;! (We are part of Nokia now). &lt;/li&gt;
&lt;p&gt;and not to forget about former Trolls &lt;/p&gt;
&lt;li&gt;Girish - &lt;a href=&quot;http://akademy.kde.org/conference/presentation/12.php&quot;&gt;OpenDocument support in KWord 2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; and playboy Zack&amp;#8217;s talk on &lt;a href=&quot;http://akademy.kde.org/conference/presentation/9.php&quot;&gt;Gallium3D - Graphics Done Right&lt;a/&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And if course, I cannot really yet mention all the really powerful great stuff being developed at Qt Sofware/Nokia.. but I really want too! Because its just too cool and will blow your minds.&lt;/p&gt;
</description>
            
            <pubDate>Wed, 06 Aug 2008 12:18:55 -0700</pubDate>
        </item>
            
        <item>
            <title>In the flow</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/In+the+flow/cbsr2</link>
            <description>&lt;p&gt;Sometimes when you think you&amp;#8217;re on to something, and you end up in the flow, so bad, that it overshadows everything you&amp;#8217;re doing. Ariya and I were working on optimizations in Graphics View and stumbled over an optimization for clipping that made a certain benchmark run 40 - forty - times faster. The patch has no known side effects, comes perfectly for free, and even opens up a couple of more optimizations we can do.&lt;/p&gt;
&lt;p&gt;I couldn&amp;#8217;t think of anything else on the way home from work. When I came home, I ate dinner, and immediately ran over to my home desktop, installed Git, and tried to find some way to continue where I left off.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s a wonderful feeling. If this patch really works this well, it&amp;#8217;ll make it into Qt upstream, for everybody&amp;#8217;s benefit. Mix that together with a lot of other optimization work that we&amp;#8217;ve done, and hopefully things will truly fly.&lt;/p&gt;
&lt;p&gt;I, for one, am looking forward to Qt 4.5 :-).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://3.bp.blogspot.com/_mijaYVAPbAQ/SJlNv_WscII/AAAAAAAAAAU/jGYOnsVZ3eE/s320/goingakademy08.png&quot; alt=&quot;I&#039;m going to aKademy&quot;/&gt;&lt;/p&gt;
</description>
            
            <pubDate>Wed, 06 Aug 2008 11:18:39 -0700</pubDate>
        </item>
            
        <item>
            <title>Opendocument format</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Opendocument+format/cbsa0</link>
            <description>&lt;p&gt;The Open Document Format (ODF) is an ISO standardized method of storing rich text and other office data. The ODF standard has grown in popularity over the last years quite a bit. Many governments around the world have passed laws stating that any sort of communication between the government and its people has to be done in ODF.&lt;br/&gt;
The attraction for ODF is strong, it is the first standard in this field that is completely open and it has a wide enough coverage that you can store your word processor and even most DTP documents in it without losing data.&lt;br/&gt;
I find the part where the standard is open very important, as an individual I have been able to sit on the ODF technical committee and I have been able to co-decide the direction of the standard. Various list-item related stuff has a finger of mine in there, for example.&lt;br/&gt;
Equally important is that everyone who wants to can implement ODF support in his or her application. All the information is available to do so, for free, on the web.&lt;/p&gt;
&lt;p&gt;So, for end users the biggest advantage of the uptake of ODF is that more and more applications will standardize on this one format and thus applications will be much more interoperable. OpenOffice and KOffice are the early adopters here, I expect that many more applications will start to generate or consume ODF in some form or other. For example to export an abstract dataset to a nicely formatted document ready for printing, or the web.&lt;/p&gt;
&lt;p&gt;Currently rich-text is mostly exchanged between different applications as html. Unfortunately html was not designed for this purpose. Sending an email with html markup kind of works. But you should take a look at the html that Qt or Word generate. Loads of extra non-html tags are written out just to put the layout information somewhere when html doesn&amp;#8217;t have any equivalent features.&lt;br/&gt;
Those made up tags will be lost when the html is opened by another application than the one that created it.&lt;br/&gt;
Longer term I expect to see email applications to send ODF as well as html in their emails. Just so they can use the much broader ODF set of features.&lt;/p&gt;
&lt;p&gt;Interestingly, a text exchange format gets more useful when more applications support it. This should be obvious &lt;img src=&quot;http://labs.trolltech.com/blogs/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;)&quot; class=&quot;wp-smiley&quot;/&gt;&lt;br/&gt;
To speed up ODF recognition Qt 4.5 will ship with an ODF writer. Qt&amp;#8217;s text module turns into a one stop document generation API where you can use QTextCursor to create your document via a nice API and you can then export the created QTextDocument to ODF ready to be opened by any opendocument implementation. Naturally exporting to plain text and html are still supported, as is printing to PDF.&lt;/p&gt;
&lt;p&gt;Support for writing ODF in Qt sets a trend that we believe in the OpenDocument Format and we think its useful to have for our customers, the open source community and all end-users out there.&lt;/p&gt;
&lt;p&gt;I always think its important to point out what our current solution does not do, just to avoid disappointment. The QTextDocumentWriter has support for each feature in Qt. So you can expect all features you can access using QTextCursor to be exported. This, however, is a subset of features in ODF. Qt&amp;#8217;s ODF-writer does not aim to support each and every feature in ODF. So don&amp;#8217;t expect you can write spreadsheets or some obscure ODF-text features that Qt doesn&amp;#8217;t have.&lt;/p&gt;
&lt;p&gt;There is work going on to make an ODF Reader too for a future release, the aim is to support all the features we write out but also try to map ODF features to Qt&amp;#8217;s feature set where it makes sense.&lt;br/&gt;
The writer is in the unstable snapshots already, and will be released in 4.5. You can find the documentation online at; &lt;a href=&quot;http://doc.trolltech.com/main-snapshot/qtextdocumentwriter.html&quot;&gt;doc.trolltech.com/main-snapshot/qtextdocumentwriter.html&lt;/a&gt;&lt;/p&gt;
</description>
            
            <pubDate>Wed, 06 Aug 2008 04:16:31 -0700</pubDate>
        </item>
            
        <item>
            <title>WebKit-based SVG rasterizer</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/WebKit-based+SVG+rasterizer/cbr80</link>
            <description>&lt;p&gt;Usually you will use &lt;a href=&quot;http://doc.trolltech.com/4.4/qsvgrenderer.html&quot;&gt;QSvgRenderer&lt;/a&gt; or &lt;a href=&quot;http://doc.trolltech.com/4.4/qsvgwidget.html&quot;&gt;QSvgWidget&lt;/a&gt; to show the content of SVG (Scalable Vector Graphics) files. So far, QtSvg supports &lt;a href=&quot;http://www.w3.org/Graphics/SVG/feature/1.2/#SVG-static&quot;&gt;SVG 1.2 Tiny static&lt;/a&gt;, without any DOM nor scripting supports. For a much more advanced SVG dancing, one way to do it is by using &lt;a href=&quot;http://doc.trolltech.com/4.4/qtwebkit.html&quot;&gt;QtWebKit&lt;/a&gt; &lt;sup&gt;[1]&lt;/sup&gt; that is available since Qt 4.4. More detailed information can be obtained by tracking the &lt;a href=&quot;http://webkit.org/projects/svg/status.xml&quot;&gt;SVG status support&lt;/a&gt; in WebKit.&lt;/p&gt;
&lt;p&gt;For the dojo example, here I present less-than-150-lines of code that rasterizes an SVG &lt;sup&gt;[2]&lt;/sup&gt; into an image. The principle is surprisingly simple: we just use &lt;a href=&quot;http://doc.trolltech.com/4.4/qwebview.html&quot;&gt;QWebView&lt;/a&gt; to load the SVG. To rasterize it, we create a &lt;a href=&quot;http://doc.trolltech.com/4.4/qpainter.html&quot;&gt;QPainter&lt;/a&gt; that operates on an image then ask the &lt;a href=&quot;http://doc.trolltech.com/4.4/qwebpage.html#mainFrame&quot;&gt;main web frame&lt;/a&gt; to render to the image by using this painter. A little bit complication is on the scaling. To keep the code cleaner and easier to understand, this little SVG rasterizer is made to work only on SVG that has a valid size, i.e. the SVG explicitly specifies both &lt;em&gt;width&lt;/em&gt; and &lt;em&gt;height&lt;/em&gt; attributes. Since DOM API is not available yet in Qt 4.4, a trick which is employed here to get both attributes is by using &lt;a href=&quot;http://doc.trolltech.com/4.4/qwebframe.html#evaluateJavaScript&quot;&gt;QWebFrame::evaluateJavaScript() function&lt;/a&gt; &lt;sup&gt;[3]&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;Without further ado, get the code:&lt;/p&gt;
&lt;pre&gt;svn checkout svn://labs.trolltech.com/svn/graphics/dojo/svg2png&lt;/pre&gt;
&lt;p&gt;As with many other vector graphics-related goodies, here is the obligatory &amp;#8220;Tiger&amp;#8221; screenshot (click to enlarge). On the left side is the SVG file shown inside Inkscape, on the right side is the rasterized version (using &lt;em&gt;svg2png&lt;/em&gt;) displayed with Gwenview. Due to the said restriction (specifying width, height), the SVG is not really the same as &lt;a href=&quot;http://www.croczilla.com/svg/samples/tiger/tiger.svg&quot;&gt;the commonly used example&lt;/a&gt;, I added both the necessary height and width attributes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://flickr.com/photos/ariyahidayat/2736900018/sizes/o/&quot; title=&quot;Result of WebKit-based SVG rasterizer by Ariya Hidayat, on Flickr&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3106/2736900018_7c042ce34c.jpg&quot; alt=&quot;Result of WebKit-based SVG rasterizer&quot; width=&quot;500&quot; border=&quot;0&quot; height=&quot;313&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As an exercise to the reader, modify the program so that it works with a remote file, e.g. an URL with http or ftp scheme. Hint: check for guessUrlFromString() function in the Qt 4.4 Demo Browser.&lt;/p&gt;
&lt;p&gt;[1] However, filter effects are not fully implemented yet.&lt;br/&gt;
[2] .svgz is not supported&lt;br/&gt;
[3] Use the JavaScript console in the &lt;a href=&quot;http://labs.trolltech.com/blogs/2008/06/02/bringing-web-inspector-to-linux/&quot;&gt;Web Inspector&lt;/a&gt; to check and play with the DOM elements and their attributes.&lt;/p&gt;
</description>
            
            <pubDate>Wed, 06 Aug 2008 02:14:48 -0700</pubDate>
        </item>
            
        <item>
            <title>Network Cache!</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Network+Cache%21/cbqtu</link>
            <description>&lt;p&gt;The past few weeks I have been hacking on another feature in Qt.  Going with the theme of making Qt 4.5 faster I added a &lt;a href=&quot;http://doc.trolltech.com/main-snapshot/qabstractnetworkcache.html&quot;&gt;cache system&lt;/a&gt; to &lt;a href=&quot;http://doc.trolltech.com/main-snapshot/qnetworkaccessmanager.html#setCache&quot;&gt;QNetworkAccessManager&lt;/a&gt; and provided a simple &lt;a href=&quot;http://doc.trolltech.com/main-snapshot/qnetworkdiskcache.html&quot;&gt;QNetworkDiskCache&lt;/a&gt; that can be used by most applications.  Under the hood the new http backend has been enhanced to support all the http rfc cache features you would expect (even behave better than FireFox in one case).  Adding a cache system is very important to a lot of our customers.&lt;/p&gt;
&lt;p&gt;- Anyone who wants to use rss/atom feeds absolutely must have a cache system in place.&lt;br/&gt;
- Anyone who uses QtWebKit has been looking forward to a cache system.&lt;br/&gt;
- Any other application that pulls down files off the network such as in XMLPatterns can use the cache to improve performance and reduce network overhead.&lt;/p&gt;
&lt;p&gt;To store the cache &lt;a href=&quot;http://doc.trolltech.com/main-snapshot/qdesktopservices.html#storageLocation&quot;&gt;QDesktopServices::storageLocation&lt;/a&gt; has a new enum &lt;a href=&quot;http://doc.trolltech.com/main-snapshot/qdesktopservices.html#StandardLocation-enum&quot;&gt;CacheLocation&lt;/a&gt; that can be used to determine a proper cross platform location for where cache files can be stored.  The included QNetworkDiskCache is simple and should be good enough for a lot of customers, but for those that want to write a highly optimized one for small devices or to hook into another cache system (such as MSIE&amp;#8217;s) the interface &lt;a href=&quot;http://doc.trolltech.com/main-snapshot/qabstractnetworkcache.html&quot;&gt;QAbstractNetworkCache&lt;/a&gt; is provided so you can implement custom cache systems.&lt;/p&gt;
&lt;p&gt;For many applications enabling the cache will be as simple as:&lt;br/&gt;
&lt;code&gt;    QNetworkDiskCache *diskCache = new QNetworkDiskCache(this);&lt;br/&gt;
    QString location = QDesktopServices::storageLocation(QDesktopServices::CacheLocation);&lt;br/&gt;
    diskCache-&amp;gt;setCacheDirectory(location);&lt;br/&gt;
    networkAccessManager-&amp;gt;setCache(diskCache);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To see it in action you can checkout the demo browser the 4.5 snapshots where I have enabled it.&lt;/p&gt;
</description>
            
            <pubDate>Mon, 04 Aug 2008 08:12:00 -0700</pubDate>
        </item>
            
        <item>
            <title>Zooming text</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Zooming+text/cbqgd</link>
            <description>&lt;p&gt;Some of my colleagues on the graphics team have been writing graphics dojo demos with impressive speed and with a rainy weekend  I thought I&amp;#8217;d get into the action.&lt;br/&gt;
As I&amp;#8217;m regarded as the text guy I thought it would be fitting to have a demo that uses text, so I made a text effect class that animates text fading in and fading out.&lt;/p&gt;
&lt;p&gt;One thing that I see a lot of people do is that if they want to zoom into text, they change the fontsize. There is a fundamental problem with that approach as text doesn&amp;#8217;t scale linearly (due to hinting). So in Qt4 we have a much simpler and more powerful way of scaling text that fits better in graphics concepts. You simply scale the QPainter during painting.&lt;br/&gt;
This means that if you call myPainter.scale(2,2); your 12pt font will suddenly appear as a nicely scaled 24pt font.  Or, more accurately, it will show the original text at 200% zoom.&lt;/p&gt;
&lt;p&gt;This is very simple and due to us reusing the same font settings we avoid recalculation and text layout. So it will actually be quite fast.  So fast that you can animate it quite smoothly.  As is shown in the demo.&lt;/p&gt;
&lt;p&gt;There is not much more to say about it, so just grab the code and run it!&lt;br/&gt;
&lt;code&gt;svn checkout svn://labs.trolltech.com/svn/graphics/dojo/zoomingtext&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/zoom1.png&quot; title=&quot;zoom1.png&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/zoom1.png&quot; alt=&quot;zoom1.png&quot;/&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/zoom2.png&quot; title=&quot;zoom2.png&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/zoom2.png&quot; alt=&quot;zoom2.png&quot;/&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/zoom3.png&quot; title=&quot;zoom3.png&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/zoom3.png&quot; alt=&quot;zoom3.png&quot;/&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/zoom4.png&quot; title=&quot;zoom4.png&quot;&gt;&lt;img src=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/zoom4.png&quot; alt=&quot;zoom4.png&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
</description>
            
            <pubDate>Mon, 04 Aug 2008 04:15:59 -0700</pubDate>
        </item>
            
        <item>
            <title>New.s.</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/New.s./cbowt</link>
            <description>&lt;p&gt;New business cards (not arrived yet). New employee badge (photo looks bad, as always). New email address (@nokia.com). New phone (starts with N). New intranet (huge). New Desktop (KDE 4.1 - I&amp;#8217;m so impressed by you guys). New presentation templates (for my &lt;a href=&quot;http://akademy.kde.org/&quot;&gt;Akademy&lt;/a&gt; presentation). New &lt;a href=&quot;http://labs.trolltech.com/blogs/wp-content/uploads/2008/08/wwf_0777.png&quot; title=&quot;HaraldWithRing&quot;&gt;marital status&lt;/a&gt;. New version control system (git).&lt;/p&gt;
&lt;p&gt;And a new patch to make Qt 4.4 build within the LSB 3.2 environment, we&amp;#8217;re getting very close to having one binary Qt/X11 Linux version to rule all distributions (bye bye distribution pain): &lt;a href=&quot;http://chaos.troll.no/~harald/patches/lsb3.2-20080801.patch&quot;&gt;lsb3.2-20080801.patch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Disclaimer: The patch above is unsupported, please contact my first name dot last name at domain starting with N for questions.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 01 Aug 2008 09:12:01 -0700</pubDate>
        </item>
            
        <item>
            <title>Phonon on Windows CE</title>
            <link>http://swik.net/Trolltech/Trolltech+Labs+Blogs/Phonon+on+Windows+CE/cbot7</link>
            <description>&lt;p&gt;Since the Windows CE platform is still missing support for Phonon in 4.4, we are working on Phonon for this new Qt platform. We ported the Direct Show backend to Windows Mobile.  Sadly there are only very few Direct Show filters available by default on Windows Mobile. But there is nothing we can do about this from the Qt side.&lt;/p&gt;
&lt;p&gt;Because not all Windows CE SDKs and Devices support Direct Show, I also wrote a backend for the&lt;br/&gt;
Wave Form API from Windows CE. This backend has a lower footprint, but is for now only able to play wave files.&lt;/p&gt;
&lt;p&gt;If you want to try out Phonon for Windows CE, then check out the Qt main snapshots, and either configure your Qt/Windows CE build with Phonon enabled (configure -platform win32-msvc2005 -xplatform wincewm50pocket-msvc2005 -phonon) or build Phonon manually (src\phonon). &lt;/p&gt;
&lt;p&gt;While playing around with Phonon do not forget to deploy phonon and the plugin for the backend you want to use.&lt;/p&gt;
&lt;p&gt;For people, who are not familiar with Phonon. Playing a wave file with Phonon just takes two lines of code:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Phonon::MediaObject *music = Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource(&quot;test.wav&quot;));&lt;br/&gt;
music-&amp;gt;play();&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The Windows CE team is always happy to receive feedback. You can subscribe the qt-wince-interest mailing list by sending the word &amp;#8220;subscribe&amp;#8221; in the subject of a message to &lt;a href=&quot;mailtoqt-wince-interest-subscribe@trolltech.com&quot;&gt;qt-wince-interest-subscribe@trolltech.com&lt;/a&gt;.&lt;/p&gt;
</description>
            
            <pubDate>Fri, 01 Aug 2008 08:13:06 -0700</pubDate>
        </item>
            
    </channel>
</rss>
