Thursday, October 22, 2009

Qt - floating tabs - my brand new feature from 2006

In the beginning of 2006 I was in the middle of writing a bachelor thesis with my two friends (Maciej Blomberg and Tomasz Lasko). I was mainly responsible for a design and an implementation of a user interface.

We were writing a cross-platform communicator with a text chat, a voice chat, and shared editing. Some of us wanted that every chat will be in a separate dialog and some of us that all chats will be in one dialog but in different tabs. Suddenly a brand new idea came up to my mind - floating tabs! A user was able to move tabs between dialogs and take them out which makes from them another dialog. Check the movie below...



I checked about twenty UI frameworks and none of them provided such feature. However after some time I found out that gimp had something similar, although gtk didn't provide that. After some tests and investigation I chose Qt as a UI framework for our application. It also didn't provide floating tabs so I decided to implement it by myself.

I took the latests Qt sources and started to analyze them and investigate the architecture. I didn't want to do any hacking. My goal was to make it clear, consistent with Qt design and API. Finally I found out few ways of changing Qt source codes to get that feature done. For our communicator I chose the best one. It worked great! It was amazing! I considered to send it to Trolltech, but unfortunatelly I didn't.

I think that it is better to write it now then never and additionally it seems that althought Qt has QDockWidget, it still doesn't have floating tabs. Maybe it 's not too late to contribute to Qt's source code.

If you are interested in the presented application or its source codes, feel free to write me an email.

No comments: