Bradley T. Hughes
Qt
Aggregated
Contributors
 in Qt, Aggregated, Contributors
 on Wednesday, January 30, 2008 @ 06:00

The news about Nokia’s intentions to acquire Trolltech is very exciting and sobering at the same time. I would characterize my own opinions and thoughts as “cautiously optimistic.” As Trolls, we are still digesting the idea, discussing it amongst ourselves, and processing the incoming information from our own management team as well as the information from Nokia.

I hope that our community, both commercial and open-source alike, don’t get too distraught about a seemingly quiet Trolltech team. We, like you, just found out about this yesterday morning and need time to absorb what this means for us, for you, for everyone. After everything sinks in, we will come out with more information in the near future, and we appreciate your patience until then.

Rest assured, Nokia has the best intentions in making this move. More information will be available soon., however the message from Nokia is clear: development, sales, open-source and community support, etc. will continue as usual. Lee Williams, Senior VP, R&D at Nokia, told us Monday that Nokia wants us to teach them how to do cross-platform and open-source development on the desktop (and not just on mobile phones). This is a bit of a special acquisition because both Trolltech, in its current organizational form, and Nokia will be working together on what the future will bring.

lars
Qt
Qtopia
KDE
Qt Jambi
News
Posted by lars
 in Qt, Qtopia, KDE, Qt Jambi, News
 on Monday, January 28, 2008 @ 07:59

As you might have seen, Nokia has announced to acquire Trolltech. An open letter to the open-source community can be found here.

This is exciting news for everyone. As you can see in the letter, our commitment to the community will not be affected by this. Qt development will continue in the same way as we’ve always done it.

Thiago Macieira
Qt
KDE
Posted by Thiago Macieira
 in Qt, KDE
 on Saturday, January 19, 2008 @ 01:29

I know this information is in Trolltech’s frontpage right now, but I’m told some people prefer to stay informed by reading blogs, so I oblige. Apparently newspapers, telecasts, press releases are a thing of the past… when was the last time you tuned to the news on the radio anyways? (Hmm… do you even have a radio?)

The headline is “Trolltech’s Qt to be licensed under the GPL v3,” which was announced by our CEO, Haavard Nord, during the KDE 4.0 Release Event, in Mountain View. Even Richard Stallman, president of the FSF and pointman in the efforts to update the license, has commented. Aside from the fortunate timing reason, we chose this time to make the announcement because it shows our commitment to Free Software. And what better time than the celebration of the release of probably the largest open source project there is?

This has been a long process, actually. Ever since the Free Software Foundation announced the final version of the General Public License version 3 text in late June last year, we have been receiving queries from several different parts of the community about if and when we would release Qt under that license. So for the past week, after Trolltech’s management approved the move, I have been working on updating the Qt 3 and 4 packages.

So now the packages are out. You can download the Qt 3.3.8b packages from our servers right now, as well as an update to the Qt 4.3.4 and 4.4.0 snapshots containing the license. Qt 3.3.8b is a simple relicensing of the 3.3.8 release: it contains no new features or bug fixes. It also does not change our support policy towards Qt 3. This release includes only the free Qt 3 packages — that is, Qt/X11, Qt/Mac and Qt/Embedded — because they are the only ones affected.

As for the Qt 4 series, we are not making any special release at this moment. Our snapshots are updated, so all the early adopters can start using the new license if they want to. The upcoming Qt 4.4.0 beta 1 and Qt 4.3.4 releases will be the first ones to actually be under the GPLv3 license.

For clients and users who are somehow constrained to the GPLv2, nothing changes. Qt is now a triple-licensed toolkit: commercial, GPL version 2 and GPL version 3 (technically, the X11 version is even quadruple-licensed). In the Open Source version, you get to choose which one you want to apply to your code. And if neither option is suitable for your needs, there’s always the commercial alternative.

One other thing I would like to point out is the fact that we are “future-proofing” it. The new license headers say specifically that you may:

(at your option) use any later version of the GNU General Public License if such license has been publicly approved by Trolltech ASA (or its successors, if any) and the KDE Free Qt Foundation.

(For those of you who don’t know what it is, the KDE Free Qt Foundation is what we call a “poison pill” for Trolltech: should we ever stop releasing open source versions of Qt, the foundation is given the right to unilaterally release the last version of Qt under the BSD license.)

And a note to our commercial clients: we have not forgotten about you. Besides the Qt source code release that the open source community gets, you also get a few extra features, like more database drivers. And, most certainly, you get priority attention from our team of support engineers, who work to help you solve your problems.

PS: I am not a lawyer and this is not legal advice. I may have understood some facts incorrectly, so do not take my blogs as advice of any kind. In fact, you shouldn’t even be reading this, right?

Simon
KDE
Posted by Simon
 in KDE
 on Saturday, January 12, 2008 @ 14:04

Congratulations to the entire KDE team for this release!

It is for sure the best release ever - due to the technology and also the excellent team effort. It takes a lot of guts to make a point-oh release and I’m very impressed by their courage and strength.

KDE 4.0 - Be Free

P.S.: I’m happy to be able to post this from within KDE 4 itself :)

Thiago Macieira
KDE
News
Posted by Thiago Macieira
 in KDE, News
 on Friday, January 11, 2008 @ 17:32

If you read Planet KDE or the news at all, you must be already aware that KDE 4.0.0 has been released. It’s all people are blogging about, so I think I should give my contribution to the crowd and congratulate everyone who has participated. Trolltech also sends its regards with this press release.

KDE 4.0 - be free

KDE 4 is the product of hundreds or thousands of contributors: developers, artists, technical writers, usability experts, beta testers, promotion people and, why not, users too. All of those who downloaded and ran one of the alphas, betas or RC and came to one of our IRC channels contributed to making it possible. It’s the result of two and a half years of work on top of KDE 3.5 — adding to the 9 years of KDE 1.x, 2.x and 3.x work.

I was a developer already when KDE 3.0 came out, but I was away from KDE at the time, tending to other businesses. Besides, the KDE 4.0 release is more closely related to the 2.0 release, when I was still playing around with KDE code. And when our codebase was much, much smaller.

Really… there’s no comparison to the KDE 4.0 release. Do you realise how many applications have just been released? How many lines of code that is? (Coverity says it’s 4.7 million, but it’s including apps not released today — by the way, we have one of the lowest defect/LOC ratio and by far the lowest in the >1 million line-of-code range).

We at Trolltech are very pleased to see it happening, not only because many of us are KDE developers too (about 15, I guess). KDE is the largest and most visible product (or, should I say, “suite of products”) made with Qt, which means we get a lot of feedback from KDE developers. The development of KDE version 4 has been no exception with thousands of suggestions sent to us. What’s more, Phonon and WebKit, major new features for the next version of Qt, are innovations that originate from the KDE Project.

Our developers on the Unix/X11 platform are all using KDE (with a few exceptions). Some have already migrated to KDE 4, others will follow soon, as soon as Linux distributions start providing packages. This is great for us, because we can readily see the effects of our changes in the KDE applications. With KDE 4 also going even more cross-platform, onto Windows and Mac, all our developers will be able to play this game. :-)

We are also a bit afraid now… Can you imagine the flood of reports we’ll get? The rest of the KDE 3 applications will be ported soon, generating queries, suggestions and bug reports to our support engineers and development team.

I’m sure it’ll be fun. I’m glad I’m here to witness this happening and to be part of the dream coming true.

Congratulations everyone!

PS: the #kde4-devel IRC channel is now gone. Long live #kde-devel!

Comments Off
kamlie
Styles
Posted by kamlie
 in Styles
 on Friday, January 11, 2008 @ 14:52

“You look at your stylesheet in awe, amazed at your own artistic power. You have just styled your widget to perfection, and it is so beautiful one could cry. Now, just to finish off with that one-pixel adjustment to the left, and…. what!? Why does it suddenly look different?”

I am sure many of you have been there when stylesheets do unexpected things. This stems from the fact that the styles were not originally meant to support stylesheets and all the adjustment capabilities that come with them. So whenever a stylesheet tries to do something that the underlying style cannot offer, it falls back onto a different style.

For this reason, we are currently aiming at trying to make stylesheets a little more consistent and predictable, and there are several approaches that can be followed. I hereby invite the readers to post some comments about what they think is important with stylesheets.

You are free to write whatever you feel, but here are some guiding questions:

  • What is your typical use of stylesheets? Giving widgets a brand new look, or just changing a color here and there?
  • Is your program used on more than one platform?
Håvard Frøiland
Qt
KDE
Qt Jambi
WebKit
 in Qt, KDE, Qt Jambi, WebKit
 on Friday, January 11, 2008 @ 11:58

There is almost always room for a browser in a desktop application. You might need to show some help pages, documents, formated source code, xml or what not. And then you need a browser.

Up to now these browsers have often been limited to show some simple html. But with Qt 4.4 and Qt Jambi 4.4 we will have a proper WebKit integration and voila.. you have a full fledged web browser at your fingertips.

Let’s have a quick look at what it can do!

browser1.pngbrowser21.png

Oi, that looks promising.. Let’s have a look at the source code to this example that has been written using Qt Jambi.

import com.trolltech.qt.core.*;
import com.trolltech.qt.gui.*;
import com.trolltech.qt.webkit.*;       

class HelloWebKit extends QWidget {       

    private QWebView browser;
    private QLineEdit field;       

    public HelloWebKit() {
        field = new QLineEdit();
        browser = new QWebView();       

        QVBoxLayout layout = new QVBoxLayout(this);
        layout.addWidget(field);
        layout.addWidget(browser);       

        field.returnPressed.connect(this, "open()");
    }       

    public void open() {
        String text = field.text();       

        if (text.indexOf("://") < 0)
            text = "http://" + text;       

        browser.load(new QUrl(text));
    }       

    public static void main(String args[]) {
        QApplication.initialize(args);       

        HelloWebKit widget = new HelloWebKit();
        widget.show();       

        QApplication.exec();
    }
}

That wasn’t difficult was it :-) But can this actually render some normal webpages.. yes it can. So here goes another screenshot :-)

browser3.png

eskil
Qt
KDE
Qt Jambi
Posted by eskil
 in Qt, KDE, Qt Jambi
 on Thursday, January 10, 2008 @ 12:58

It’s been a happy few weeks. Right before the Christmas holidays, Qt Jambi was nominated for the Jolt awards (”the Oscars of the industry”, we’re more or less nominated for an Oscar, tell your friends), and, as you may well be aware, Qt 4.4 will ship with the excellent Phonon Multimedia framework as announced in the beginning of December.

For those of you who hadn’t heard, the Phonon framework is a cross-platform class library which can (among other things) enable your application to play any media files supported by a system backend. By default, this backend is Microsoft DirectShow on Windows, GStreamer on Linux and QuickTime on Mac OS X.

Now, where it makes sense and is possible, we make the Qt Jambi APIs “identical” to the Qt APIs. This means that if you have experience with one framework, you should be able to learn the other one with very little effort, granted, of course, that you already know both programming languages well enough. In fact, porting examples from Qt for C++ to Qt Jambi (which I’ve done a fair number of times by now) is primarily a search/replace of arrows to dots, and is so simple it’s comparable to what scientists call “doing nothing.” The latest addition to Qt Jambi 4.4 is the com.trolltech.qt.phonon package, and this blog is mainly a celebration of the fact that I just finished porting the Media Player demo from C++ to Java, and that it works.

So, without further ado, here’s a brief low-res video of what you can expect. It shows the Qt Jambi media player running through Eclipse, the application playing a movie, and me moving some sliders to alter the brightness, contrast, saturation etc. of the movie stream. I forgot to turn off my microphone, which is why the audio is terrible, so please disregard that.

That’s it. I hope you find it impressive and I hope you will have some use for it when Qt 4.4 and Qt Jambi 4.4 are out later this year.

jasmin
Uncategorized
Posted by jasmin
 in Uncategorized
 on Thursday, January 10, 2008 @ 12:00

I am pleased to announce that Mark and I have now sent the final manuscript of C++ GUI Programming with Qt 4, Second Edition (ISBN 0132354160) to the publisher.

This extended and revised second edition has been thoroughly updated to take advantage of features introduced in Qt versions 4.2 and 4.3, including QGraphicsView and QDialogButtonBox, and features two new chapters and two new appendixes:

  • Look and Feel Customization (covers style sheets and QStyle)
  • Application Scripting (covers QtScript/ECMAScript)
  • Building Qt Applications (covers qmake, cmake, bjam, and scons)
  • Introduction to Qt Jambi

The original graphics chapter has been split into separate 2D and 3D chapters, which between them now cover the new graphics view classes and QPainter’s OpenGL back-end. In addition, much new material has been added to the Database, XML, and Embedded Programming (Qtopia) chapters.

This new edition is 180 pages longer that the previous one, and is available in hardcover. It is already possible to order it from Amazon.com.

From the preface:

This edition, like its predecessors, emphasizes explaining Qt programming and providing realistic examples, rather than simply rehashing or summarizing Qt’s extensive online documentation. Because the book teaches solid Qt 4 programming principles and practices, readers will easily be able to learn the new Qt modules that come out in Qt 4.4, Qt 4.5, and later Qt 4.x versions.

Andreas
Qt
KDE
Labs
Graphics View
Painting
Posted by Andreas
 in Qt, KDE, Labs, Graphics View, Painting
 on Tuesday, January 08, 2008 @ 14:54

We’ve gotten reports about how Graphics View’s performance drops in one special (yet quite common) case. It’s the case when the item is fairly thin, flat, non-square, or simply sparse, where QGraphicsItem’s bounding rect generates something close to worst-case updates that cause repaints of areas that really haven’t changed. A very helpful customer showed me a simple testcase that illustrates this problem, which is quite hard to work around, which again effectively makes it a bug. Start the portedcanvas example, and clear the canvas (CTRL-E). Add a few meshes (ALT-M). Now click a node in the top left corner and drag it down towards the bottom right corner.

portedcanvas screenshot

Performance degrades steadily as you get closer and closer to the bottom-right corner, until the example almost grinds to a halt. The example is very busy doing something close to nothing, at least it seems so. It’s redrawing the bounding rectangle of the edges to the node you’re dragging.

The yellow thing you get in debug mode by setting/exporting QT_FLUSH_PAINT=1 reveals what’s going on.

portedcanvas screenshot using bounding rect updates

To finally hammer this bug down, we’ve added an opt-in feature, QGraphicsItem::boundingRegion(), and a configurable granularity. You can tune the granularity of the bounding region of your line / edge / connector items, and with the wave of a wand, QGraphicsView will magically generate an optimal update region for that item.

So with 4.4, you’ll instead get something like this:

portedcanvas screenshot using granular region updates

What you’re seeing is that each of the two connector lines updates itself using a region consisting of 20-30 rectangles, a tunable granularity.

Should be in tonight’s 4.4 snapshots.