Qt

I (Am)bassador

Submitted by mimec on 2011-04-08

A few weeks ago WebIssues became a member of the Qt Ambassador Program organized by Nokia in order to promote Qt development. I got a shiny new Nokia C7 phone and I must say that I like it, even though I was generally very skeptical about touch screen mobiles. Obviously Noka's goal in giving away those phone to Qt developers was to encourage them to create applications for Symbian. I don't know if they will be able to defend against growing domination of Android and iOS, but I've been using various Nokia phones for many years (starting with the iconic 8110 model known from Matrix) and I'm kind of attached to this brand. Besides I've been thinking about a mobile WebIssues client as an addition to desktop and web clients for a long time and now that I have the right tools, I will definitely return to this idea once version 1.0 is released.

Being an ambassador of Qt I feel that I should write about it more often, not only in form of articles, but also as a regular blog. The articles became quite outdated; I created a completely new XmlUi toolkit which is already available as part of both Saladin and the alpha version of the WebIssues Client. It replaces traditional menu bar and toolbar with a single ToolStrip control which is similar to the Ribbon known from MS Office, but much simpler. It also incorporates a simplified version of the WindowsModernStyle. Last week I also decided to replace the RDB classes with SQLite based storage which will make the desktop client much more scalable as it won't have to store the entire data cache in memory. The whole subject of integrating Qt with SQLite turned out to be quite complex, so I will write more about it soon.

Third Qt article

Submitted by mimec on 2008-07-14

I published the third (and for now the last) Qt article, called Modern Qt style for Windows. It's a Qt style for Windows modifying the look of toolbars, menus and some other components, resembling MS Office 2003 and some .NET applications. In WebIssues I originally used a customized version of the DotNetStyle, which was recently published as a Qt Solutions component. For Fraqtive I created a new style written almost completely from the beginning. Now I removed the remaining GPL-ed code copied from the DotNetStyle component and relicensed the entire code to a BSD-style license, allowing to use it in both GPL-ed and commercial applications. Note that this style is written specifically for needs of WebIssues and Fraqtive. There is no warranty that it will be suitable for all applications without modifications. Of course suggestions of improvements and bug reports are as always welcome.

Shortly I will release a new version of Fraqtive including the current version of this style and some other minor UI improvements. I'm also finishing refactoring the WebIssues code and I soon I will start implementing some new features, so if everything goes well, a beta release will be available in the beginning of August. Then I'm going for a week to Vancouver. It's a business trip, because I work on a project for a Canadian company, but I will also have some time to rest and visit some nice places in the area, so I'm impatiently looking forward to it :).

Modern Qt style for Windows

Submitted by mimec on 2008-07-14
WMStyle

Introduction

The WindowsModernStyle changes the look of toolbars and menus to a style similar to MS Office 2003 and some .NET applications. Depending on the selected color scheme of Windows XP and Vista, they will automatically use the blue, silver or green colors. Also when the Windows Classic style is used, the toolbars and menus will adjust their look to the current color scheme.

In addition, this style also changes the look of:

  • docked windows, including their title bars and tabs used when multiple docked windows are stacked together
  • tab widgets located within a main window (tab widgets placed in dialogs and other windows are not affected)
  • splitters located within a main window
  • toolbox widgets, including both item headers and background of pages

All other widgets are not affected and are rendered using the native Windows style (Vista, XP or classic Windows, depending on the OS version).

The style can be included in an existing application or compiled as a plugin library. This package also contains a demo program using this style.

WindowsModernStyle requires Qt 4.3 or newer, compiled with the Windows XP and Windows Vista styles enabled.

Note: a new, simplified version of the Modern Qt style is now part of the XmlUi component.

Documentation

You can find the full documentation for this article at doc.mimec.org/articles/wmstyle/. It is also included in the source package.

History

1.1 (2009-11-23)

  • added: support for toolbar buttons with menu
  • fixed: painting undocked toolbars
  • added: styling splitters in main window
  • fixed: improved appearance of styled tab widgets

1.0 (2008-07-14)

  • initial version

Downloads

This code can be freely used and modified in both open source applications (including GPL) and commercial applications.

Second Qt article

Submitted by mimec on 2008-06-23

The second Qt article is available, called Simple XML-based UI builder for Qt4. It's a component which allows to merge actions from multiple components and define the layout of menus and toolbars using simple XML files. I wrote it for WebIssues when porting from KDE to Qt4 to replace the KXMLGUI components that I previously used; however this new solution is much simpler and it doesn't depend on anything else than Qt.

Soon I will publish one more article with the graphics style for Windows used by Fraqtive. The style used by WebIssues was based on a Qt Solutions component, but the new one was completely rewritten by me, so when I remove the remaining pieces of GPL-ed code I will probably re-license it to a BSD-style license as well. Then if only I have some time, I'm going back to work on the next version of the WebIssues client.

A little side note: my recent post about moving from Gliwice made my boss panic a little bit, which is actually a good thing, because I got a pretty decent argument to think through this decision :). The truth is, if I had one argument of, let's say, more non-material nature, I would immediately buy a flat in Gliwice and, you know, live happily ever after and all that stuff. But unfortunately life is much more complicated and sometimes we have absolutely no influence on some things, so all I can do now is wait a bit more.

New articles

Submitted by mimec on 2008-06-09

I started writing first articles about programming containing reusable source code more than six years ago, inspired by websites like CodeGuru and CodeProject which were an invaluable source of information when I was learning Visual C++ and MFC. They are still available here and remain the most popular section of my website. The idea of reusing code is even more important in open source development, but it took many years until I finally decided to start publishing articles related to Qt.

At the moment I'm extracting reusable components from the WebIssues Client code and writing documentation and demo applications for them. The first article called Simple template-based relational database is already available. It describes the data container invented for and used by the WebIssues Client, which is an interesting and innovative alternative to using a hierarchy of objects to store application data in memory.

Though WebIssues is licensed under the GPL, I decided to relicense all reusable components using the revised BSD-style license, which allows to use them in both open source and commercial applications.

Another article I wrote some time ago describes the Generator core component of Fraqtive. I'm publishing it because it may be a good source of knowledge for someone who wants to learn metaprogramming on a practical example. The generator core is the most advanced piece of code that I've ever written in C++. It turned out to be an excellent exercise field, because the code is relatively small and simple, yet it allowed me to use a large number of various programming techniques, including metaprogramming with complex class templates.