Now that 4.4 is out, I finally found the time to kick off some new development and one of my pet projects these days is QGtkStyle. We already have QCleanlooks, icon themes, standard shortcuts and dialog buttons to integrate with GNOME, but to achieve true perfection we need to use the Gtk theme engine directly just like we do on Mac and Windows. QGtkStyle does exactly this, and in addition extends and surpasses QCleanlooks in a lot of other areas as well. All group boxes are now flat style to blend better with GNOME dialogs. Icon theme support has improved, scrollbar buttons are disabled at edges and item view branches now support hover.

The style is already available right now as a Qt 4.4 plugin on Labs and given that you can accept the normal disclaimers about using unreleased and experimental code, you can start playing with it immediately.
This is how the Arora browser looks:

All the above shots were taken using the “Clearlooks” engine. Here are a few alternatives:
Ubuntu Human:

Mythbuntu:

And of course the unforgettable Raleigh engine:

The style now comes in two flavors: Standard, and Office. The standard style is the one seen previously. The new Office style is presented here:

I also have some good news for commercial users waiting for this. The style will be renamed QtDotNetStyle and should be released as a dual licensed Qt Solution, hopefully next week.
Seeing all the interest in the DotNet style makes it fairly obvious that you would like to have sexy tool bars with Qt. Today I implemented another popular style for tool bars on Windows: the Explorer style. The difference might not be all that obvious at first sight, but you will see a nice gradient shading across the tool bar and menu areas if you look closer. It is also entirely theme dependent.
Here is how it looks on XP:

And here is how it looks on Vista:

Get the files here : explorerstyle.zip
To try it out simply compile the style and run your application with “-style explorer” as command line arguments.
A few notes :
- left and right toolbar areas do not have gradients as the shading looked a bit weird in those areas
- It requires Qt 4.3.0 and will only work on Windows
- You can use it on both open source and commercial apps at your own risk
Enjoy

Some of you might remember my blog post about this back in October. Now that 4.3.0 is out, I finally had time to clean up the sources and release something usable on labs.
http://labs.trolltech.com/page/Projects/Styles/DotNet
The style is a close approximation to the appearance of Visual Studio 2005, Office 2003 as well as the .NET based application framework. It will give your application a modern gradient appearance for tool bars and menus while retaining the native look and feel for other widgets.
A solution for commercial customers will probably be made available in the near future based on feedback I get on this.

Vista introduced a new optional “Explorer” style for some of its item views. While Qt 4.3.0 uses this style for its item view classes, the selection background of the the delegate itself still retains the appearance from XP since it is not currently decorated by the style. While we consider revising this for a future version of Qt, it is in fact already possible to get the themed selection backgrounds by using the following custom delegate as shown in our modified dirview example above. The image below shows the same application without row selection and a single column.
vistadelegate.h
vistadelegate.cpp

A few notes about this delegate:
- It requires the Vista SDK and must be linked against gdi32.lib, but it should not have extra runtime dependencies.
- On platforms other than Windows Vista the standard item delegate decorations are used.
- It is primarily designed for tree views, but can be used with other views as well.
- Hover appearance is currently disabled when row selection is used since it would require some extra updates from the widget.
Windows Vista introduced the concept of command links. A command link is a special button type primarily designed to streamline Wizard-like interfaces. Pressing a command link should always take you to a different page, just like in a web browser. In addition to the visual difference, it can also include a descriptive text.
Example :

A command link class did not make it into 4.3, and it has not yet been decided if it will be part of our standard widget set.
However some support was added in the style API to support these features, so I decided to make a small
example on how to implement this functionality using Qt 4.3. In fact, the screen shot above was made using Qt.
You can try out the following subclass of QPushButton that adds these features : commandlink.h and commandlink.cpp . Note that the size hint calculation is somewhat rudimentary and does not guarantee the visibility of the description text.
To use this in a QWizard you could do something like this :
QWizard wizard;
QWizardPage page;
QVBoxLayout layout;
CommandLink button;
button.setText(”&Press me!”);
button.setDescription(”Pressing this button should do something”);
layout.addWidget(&button);
page.setLayout(&layout);
wizard.addPage(&page);
wizard.show();
The only thing remaining now is to connect the clicked signal to for instance QWizard::next(). Note that the code will also work on other platforms and styles. This is the above button rendered with Plastique style :

Update 05.21.07 : Tweaked the font settings a bit
Qt applications have been using the Windows theme API to draw it’s widgets since the Qt 3 series. This is why existing Qt applications already fit very well into the Windows Vista desktop.
Yet, there have been quite a few cosmetic changes to standard controls on Vista and many widgets are now fully animated, including state transitions, pulsating default buttons and progressbars. To address these changes, we will introduce QWindowsVistaStyle in Qt 4.3.
It will be made available in the public snapshots tonight so that our users can start to experiment with it.
Here are a few examples:

This is how Designer looks:

Not too long ago, someone asked why we did not support dot net style in Qt. Although the name is a bit misleading, it means the look and feel that apps such as Office and Outlook currently use. These applications are like Qt based on the windows style engine, but for some of the components that the theme does not define they use a more fashionable gradient appearance.
To prove that Qt can actually support these styles, I wrote a plugin style for Qt 4.2. If there is sufficient interest we will of course consider making it available as a solution or even as a part of a future version of Qt.
Here is some eye candy:

And this is how it looks with the blue palette:

We have been working hard on improving our desktop integration with Qt lately. We automatically use the Plastique style if KDE is detected on startup. Starting with Qt 4.2, we intend to pick up the icon theme as well. This means that most of our standard dialogs, such as message boxes and file dialogs will use the same icons as KDE.
GNOME users will get the same treatment. The second image shows a message box on Ubuntu, using the Cleanlooks style and picking up the Human icon theme.


No, this is not a GNOME application, but a Qt 4 app running on GNOME.

Plastique was designed to closely resemble the default style in KDE. With Qt 4.2, we are introducing a new style that will blend better into standard GNOME based desktops as well.
The style is based on the current default style for GNOME, Clearlooks. It will also be available on other platforms.