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.

lars
Qt
KDE
Posted by lars
 in Qt, KDE
 on Wednesday, February 28, 2007 @ 15:26

As Zack already mentioned in his blog, we had George Staikos visiting us in our Oslo office last week. He, Andreas and myself sat down to hack on some rather big API additions to our networking module.

Some of these changes have been visible in the snapshots for a few days now, as the work I have done to add support for transparent HTTP proxies to Qt (up to now only Socks5 was supported). A new QAuthenticator class has been added, handling the most common authentication methods used with proxies and HTTP servers (Basic, Digest-Md5 and NTLM). In addition all our networking classes got signals to tell you when a server (or a proxy) requires authentication. Today I’ve also updated the http example in Qt adding one UI file and around 10 lines of code showing how to show an authentication dialog to the user if the web server requires it.

A side product of doing Digest-Md5 and NTLM authentication for Qt was a neat little class called QCryptographicHash, that can calculate Md4 (I know you shouldn’t use that, but NTLM requires it…), Md5 and Sha1 sums for you. The class is now part of QtCore.

The other big API addition that mainly Andreas (with help from George) has been working on is to add SSL support to QtNetwork. He submitted it to Qt about an hour ago, and you’ll be able to see the code and play around with it in tonight’s snapshots. We’ve done a few rounds on reviewing the API so we hope that the API is rather stable and includes most of the features required for doing SSL. The QSslSocket implementation is mostly done, but certificate and key handling still has quite a few rough edges in the implementation, which we’ll try iron out within the next week or two.

Anyone who’s ever tried to use the API of OpenSSL directly knows how hard it is. Opposed to that, we’ve tried hard to make it as simple as possible to use QSslSocket without compromising on security. In the end we came up with a design that should be trivial to use for anyone who ever used any of the Qt socket classes before. The whole design consists of 5 classes: QSslSocket, QSslCertificate, QSslCyper, QSslError and QSslKey.

QSslSocket derives from QTcpSocket and all you have in addition is a few methods to to the following:

  • key and certificate handling
  • start the server or client SSL handshake
  • one signal reporting errors
  • a slot to tell QSslSocket not to abort the connection after the error
  • some signals and properties for status reporting
  • and a convenience method to connect to a host and immediately enter SSL mode

We hope that the other classes are mostly self explanatory, but we hope to have enough time until 4.3 comes out to write a few nice examples.

For now, you can find a small example using QSslSocket here. It basically connects to an arbitrary server and port and will give a telnet alike command line after connecting to the server. Andreas states that the UI is ugly, so you better use the app with your eyes closed ;-)

lars
Qt
KDE
Posted by lars
 in Qt, KDE
 on Tuesday, November 14, 2006 @ 12:10

One of the great things of Open Source development is that you can follow development on a day to day basis. Look at the code, play around with it and try out some of the new features.

In that respect Qt development has unfortunately not been as open as it should have been. Qt snapshots where only available after we had released a Technology Preview or a Beta of a certain version. We have in the past gotten lots of questions about our current development version in the past. Many developers are curious as to what we’re up to and interested in getting their hands onto the new things we’re doing.

To make this possible, we’re now publishing snapshots of our bleeding edge development branch. You can either get daily snapshots from ftp://ftp.trolltech.com/qt/snapshots or one of it’s mirrors (look for the 4.3.0 snapshots) or via rsync. Here are the urls for the different platforms:

rsync://rsync.trolltech.com/qt-x11-bleeding
rsync://rsync.trolltech.com/qt-win-bleeding
rsync://rsync.trolltech.com/qt-mac-bleeding
rsync://rsync.trolltech.com/qtopia-core-bleeding

Lots of new features that will go into Qt 4.3 have already been integrated into this branch. For those of you who like running experimental code, this is your chance of playing around with it. These snapshots are completely unsupported and don’t expect things to work (or even compile) all the time, but we appreciate every feedback you might have on the new features and APIs.

lars
Qt
KDE
Posted by lars
 in Qt, KDE
 on Friday, June 30, 2006 @ 12:01

We had a few days with an intense bug fixing session here in Oslo trying to get the Qt 4.2 Tech preview out of the door. It’s now available since about an hour.

Lots of work has gone into adding new features. Just check out the 4.2 intro page. But apart from the larger features mentioned there, lots of work has also gone into less visible areas:

  • Up until 4.1 Qt was now creating native window handles when the QWidget was constructed. This has now been changed to creating the handles on demand, something that decrease application startup time and resource consumption.
  • Qt now contains a parser that can parse CSS syntax. Currently the parser gets used in two places: In the HTML import for QTextDocument/QTextEdit to parse <style> tags and external stylesheets correctly. The other usage is in the new setStyleSheet() method of QWidget. This is still a bit undocumented, but it allows you to style your widgets using a CSS like syntax. Try for example calling setStyleSheet on QApplication with the following sheet:
    QPushButton { color: white; background-color: red;
    border-width: 2px; border-style: outset; border-color: yellow;
    }
    QPushButton:pressed { border-style: inset; }
    QMenu { background-color: #00cccc; selection-background: brown; }
  • Another feature that is not mentioned, is that we now have a QWidgetAction class that can be used to add QWidgets to menus. In contrary to the similar feature we had in Qt 3, this one does now also work on Mac OS X.
  • Another thing you can do with Qt 4.2 is to add application private fonts to a Qt application, by just specifying the path to a truetype font (or embedding it as a resource into your application).
  • There are lots of other things that are not mentioned in the 4.2 intro page that I won’t mention here neither, but I’m sure you’ll find them.

    As always we will be happy to get your feedback on the new features.

    Have fun playing with the Tech Preview :)

Comments Off
lars
Qt
KDE
Posted by lars
 in Qt, KDE
 on Thursday, December 22, 2005 @ 11:54

PDF and Postscript generators

With the release of 4.1 Qt has gained the ability to generate PDF natively. We have put special care trying to make sure all features of Arthur are also supported in our PDF generator.

This implies that we can do alpha transparency and gradients in the generated PDF. One main issue I found while bugfixing the implementation is that our open source PDF renderers (ghostscript and poppler) still have a large way to go to support more advanced PDF features. poppler wasn’t even able to handle masked images (something that apparently has been fixed a few weeks ago), while both of them had rather large problems with real transparency.

We have written code to generate native gradients in PDF that are semitransparent. The only problem is that the only viewer that can render them correctly is adobe’s acrobat reader. So for the moment that code is disabled and we embed the gradient as a pixmap. The resulting PDFs are quite a bit bigger and slower, but at least they render correct on all three PDF viewers.

The only small drawback of our PDF generator in Qt 4.1.0 is that the generated PDF is not searchable. But this is only because the code needed to implement this has missed the 4.1.0 deadline. It’s written and tested, and Qt 4.1.1 will thus generate searchable and Unicode compliant PDF .

At the same time I’ve took the opportunity and have rewritten parts of the Postscript backend. We now embed fonts as Type1 fonts (it used to be Type3), something that will make the size of the generated Postscript quite a bit smaller. At the same time I’ve fixed a few bugs in the Postscript generator that where outstanding since Qt 4.0.0.

Qt can do WYSIWYG layouting!

While I’m writing about printing, let me also say that the myth that Qt can’t do WYSIWYG text layouting is wrong. I saw this being repeated quite a few times on the dot, see for example James comment.

Qt 4 has support for using design metrics of fonts. If you’re layouting text on a per paragraph level, QTextOption has a flag to enable this. If you use Qt’s build in rich text support, you can set a flag on a complete QTextDocument.

When using these flags, all text layouting calculations will be done with subpixel precision using the linear/design metrics from the font.

The fact that QPrinter::supportedResolutions() returns 72 for postscript has nothing to say in this respect. All the number gives you is a conversion factor between units on a QPainter and millimeters on the output device. QPainter has since Qt 4.0 a floating point API that allows you to place objects at arbitrary positions inside a postscript (or for that respect PDF) document.

So in the end there should be no real problem for kword or any other Qt application to do WYSIWYG text layouting and printing.

Have a nice christmas and a happy new year!

lars
Uncategorized
KDE
Posted by lars
 in Uncategorized, KDE
 on Friday, August 12, 2005 @ 12:32

I’m currently enjoying a three week vacation for the most wonderful of reasons. My wife gave birth to our daughter, Sarah, the 1st of August. After sleeping most of the time for the first 1 1/2 weeks she is now starting to be more awake every day. After some tiring first days our life is now slowly settling in again, and both Isabel and myself now can’t imagine a life without her anymore.

Sarah, 1 day old

The last few days I have started to find a little bit of time again and wanted to start working on some fun stuff (no Qt work, I’m on vacations… ;-). Unfortunately the first thing that happened was that the hard disk of my laptop broke and I spend the last two days reinstalling everything :/

At least the laptop is working again now, and I’ll probably have a look into some X11 stuff during the next week.

I don’t want to leave Isabel alone with Sarah just yet. So I won’t be able to make it to Malaga this year. It’s the first time in 5 or 6 years that I will miss a KDE meeting. But I promise to be back next time ;-)