4.3.0 beta binaries

Open Source
Open Source binaries are now available at ftp://ftp.troll.no/qt/source

There have been a couple of reports of compilation failing with MinGW. You can solve this in two ways – Either upgrade your Win32 API headers to atleast 3.7 OR use the binary package which comes with a fix for the compilation. Note that you won’t be required to upgrade your Win32 API for the final 4.3.0 package.

Commercial
Commercial binaries should be available in your distribution directory.

There are two binaries for Windows – One with Direct3d support and one without Direct3d support. The package with Direct3d support requires the Direct3d runtime. IMPORTANT : Without the runtime, none of the programs in the package will run. You need a fairly recent runtime – Use this NOT this). Once installed, you can start any Qt program with the -direct3d argument to see the Direct3d paint engine in action.

Note: Qt’s dependency on Direct3d run time when compiled with “configure -direct3d” has been removed in the snapshots. The limitation exists only in the beta.

twitter

Qt 4.3.0 beta released

We released Qt and Qtopia Core 4.3.0 beta source packages today. You can download them here. Binaries will be available by this friday. Note that the Open Source beta packages are now available under GPL.

Space being limited, a lot of non-buzzword-compliant features got unceremoniously dropped from the What’s new page. So here is a random list of features I can think of right away that are not mentioned there

* New platform Qt/MSYS (being the release manager, I get to shamelessly plug my feature first ;) )
* Unified tool bar for MAC
* New XML classes QXmlStreamReader and QXmlStreamWriter
* Object Bounding Mode for gradients
* QDir search path
* Perspective transformations
* Almost every Qt widget now supports styling using stylesheets (I will blog about all the enhancements in the days to come).
* QApplication::alert
* QDirIterator
* Prioritized posting of events
* Set operations on paths
* QWidget is now locale aware
* QColumnView
* Unicode 5 support
* Editing dynamic properties in Qt Designer
* The supremely cool Qt::BlockingQueuedConnections

A few more come to my mind but I will leave them for you to discover :) . Don’t hesitate to contact us at the qt4-preview-feedback for any help.

Happy hacking!

twitter

Qt/MSYS

Whew, finally!

Users of Qt/MinGW have been restricted to compiling and using Qt with the Windows shell cmd.exe. Compilation of Qt would fail even with the presence of the MSYS shell sh.exe in the PATH. This caveat, has over the years, resulted in very many user complaints including this, this, this, this, this and not to mention lots of support requests.

The problem is that the MinGW make mingw32-make starts spawning processes through sh.exe instead of cmd.exe when a sh.exe is found in the PATH. sh.exe, of course, does not understand Windows shell built-in commands and expects the unix path separator / causing compilation to fail.

For 4.3, we have enhanced qmake to detect sh.exe in the PATH and write out a makefile that mingw32-make/sh.exe likes. This means that you can now compile Qt and your programs using the shell of your choice. Other advantages include usage of built-in sh commands and autoconf scripts. It also turns out compilation using sh is way faster than using cmd.exe.

On a more technical note, the new QMAKE_SH variable provides the path to sh.exe (even if you are using MSVC) and MINGW_IN_SHELL is set to “1″ if you are using MinGW inside a shell. If you switch shells, all you need to do is to rerun qmake.

twitter

System tray update

Thanks to some great work by Sam Magnuson, QSystemTrayIcon::showMessage() will support Growl on the mac in Qt 4.3. With this change, supportsMessages() no longer returns false on any of our desktop platforms. Here’s the obligatory screenshot:

QSystemTray Growl Support

Note that the documentation for showMessage() states that messages are not guaranteed to be displayed. As a result, we have received a few requests for an API to query the position of the tray icon (and hence make it possible to popup custom balloons). The awesome news is that for Qt 4.3, we have added QSystemTrayIcon::geometry() that will return the geometry of the icon in global coordinates.

Oh and in case you missed Lars’ post, Qt 4.3 snapshots are available here. We had to put in a few hacks to get geometry() to work reliably on all platforms. Let us know if it doesn’t :)

twitter

Auto completion

Lost in all the Qt 4.2 publicity for Widget Style Sheets and Graphics View is the auto completion framework which makes it easy to provide auto completions in just about any widget. The framework is really just one class – QCompleter. The completer provides support for three completion modes – Inline, Popup and Unfiltered Popup. It can provide completion from any role and any column of an QAbstractItemModel. You can iterate and query the completions. What more, it is super optimized for large sorted and unsorted models.

It is not hard to imagine where the QCompleter can be first put to use. Practically just about every application has the line edit and browse button combination. Using QCompleter, providing auto completions for file names from the file system is straightforward,

QCompleter *completer = new QCompleter(fileNameEdit);
QDirModel *dirModel = new QDirModel(completer);
completer->setModel(dirModel);
fileNameEdit->setCompleter(completer); // new in 4.2!

QLineEdit with a QCompleter

QCompleter can even be used in a QComboBox. By default, a QComboBox provides inline completions from the items in its drop down list. With the introduction of QCompleter, you can set up QComboBox to provide auto completions from a model independent of the items in the drop down list. The user can use the drop down list to view items previously entered.


QCompleter *completer = new QCompleter(fileNameCombo);
QDirModel *dirModel = new QDirModel(completer);
completer->setModel(dirModel);
completer->setCompletionMode(QCompleter::PopupCompletion); // check out other completion modes!
fileNameCombo->setCompleter(completer);

QComboBox with a QCompleter

Providing completions in a custom widget is all about calling complete() and setCompletionPrefix() in the right places. Check out the custom completer example for details.

twitter