Qt

I (Am)bassador

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.

Filed under: Blog

Third Qt article

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; you can post them on the forums. Also note that while this code is free for all uses, please consider making a donation if you use it for commercial purposes.

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 :).

Filed under: Blog

Modern Qt style for Windows

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 menus
    • added: styling splitters in main windows
    • fixed: improved appearance of styled tab widgets
    • fixed: painting undocked toolbars

    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. If you find it useful, please consider donating to mimec.org!

    See also:
    • list of all WMStyle releases on the SourceForge.net download page
    Filed under: Blog

Second Qt article

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.

Filed under: Blog

New articles

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. If you use the code for commercial purpose, please consider making a donation to the author. I will also happily answer all questions, requests and bug reports on the forums.

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.

Filed under: Blog
Syndicate content