Witold on OpenGL - for the third time

Witold just announced the third part of his OpenGL + Model-View article series. It is an interesting concept and shows that the model view solution can be applied to many parts of Qt. For example the QGraphicsView would also benefit from having a model holding the items. The different types of items would then be managed by different delegates...


Holiday Spirits

Lots of preparations as the holidays are getting closing - quickly. Right now I've prepared 1.6kg Swedish meat balls (this is about a third, just before frying them).

The next stage was the Christmas tree. A nice Swedish spruce (gran) with decorations, next to my favourite working arm chair. The pillow is made from the original clothing.

And what is this?

It is the top of the decoration that we use to cover the hole over the stairs since the upper floor is far from done. The other side looks more appealing. Thanks to Illum, Copenhagen for the idea. My wife noticed the style there. Using the right thread and amount of balls - we use 27 - a "cloud" of balls is created.


Acer Annoyance Fix

One of the things that have annoyed me since I started working with an Acer laptop was that when working in Windows the GraviSense application appeared in the Alt-Tab list even if it had no window to show. To save that extra Tab key press I asked Raymond Chen for a tip on how to make it go away. The solution was to set the WS_EX_TOOLWINDOW extended style bit. Taking this and the good old LCC-Win32 compiler I put together the following little snippet and the window disappears from the Alt-Tab list but stays alert (I shook the laptop gentry to trigger it).

#include <windows.h>

int APIENTRY WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, int nCmdShow)
HWND acerWin = FindWindow( NULL, "ACER_GraviSense" );

if( !acerWin )
return -1;

SetWindowLong( acerWin, GWL_EXSTYLE, GetWindowLong( acerWin, GWL_EXSTYLE ) | WS_EX_TOOLWINDOW );

return 0;

And they say that Linux is for those who wants to hack the system... :-)


Happy News

Qtopia Core goes Open Source.

No mode dead-lines

Finally I have no more dead-lines this year. This does not mean that I can relax for the next couple of weeks but it means that I'm no longer working with a knife to my throat. Next month will be interesting... I'm planning to write seven chapters for my book, around 170 pages. I also plan to write two articles for Datormagazin (some 10 pages with a small font - almost 20 A4 pages when using Word with its default font). I guess 200 pages per month (10 pages per work day, 1.25 pages per hour, including research) is what it takes for a technical writer and that is one of my professional options that I'm looking into for the moment.

Anybody out there needing help with white papers, articles, documentation or any other text in February - feel free to contact me. I would prefer to work close to Qt technologies, but I'm open for other suggestions too.


Quick Question

Right now I'm building a dll file on Windows using the following make file:

all: sum.dll

sum.o: sum.c
gcc -c sum.c

sum.dll: sum.o
gcc -shared -o sum.dll sum.o

To build a so file on Unix I have to change the first and last lines to read sum.so instead of sum.dll. The same thing applies on OS X, but there I want to build sum.dylib. Does anyone know if there is a little flag or such that I can use to let GCC add the right file extension to the resulting file without having to play around with environment variables and such?


Time for Qt-ness

As of today I will spend all my working time on my book on Qt and other Qt projects until February. Hopefully this will mean a boost in productivity - I just want to avoid working myself to death :-)


Two Weeks to Christmas

Now it is just two weeks left until Christmas. Three weeks until the new year. The current state is that I have bought one Christmas gift - lots to go - and that my wife's birthday is on the last day of the year. This means getting at least one more gift.

I also have to complete two more chapters for my book project - and complete my current customer project. I'm helping an automotive company some 70 kilometres from Gothenburg with their test management system.

Now, I'm not the one in the biggest rush - not by far. King Bore has not even got started. It is still between five and ten centigrades above freezing and no snow in sight.

I'm dreaming of a white Christmas...

Python can be Qt - and KDE as well.

In a comment David recently asked me if I had any reading tips on KDE, Qt and Python. I must start by saying that I have done little more than Hello World(TM) using PyQt.

Anyway, David, I would recommend you to start by visit Riverbank Computing - they have sections on both PyQt and PyKDE. They also manage the Python bindings for Qt. Then there is Boudewijn Rempt's book on PyQt GUI Programming with Python Using the Qt Toolkit - a book that I have been meaning to read for years. Finally there are two wiki resources #1 and #2.


Game on

A little winter themed board game for all of you geeks out there. I wonder if they will do a C++ version with exceptions and some multiple inheritance for the slightly older kids.


More Entertainment

The next F1 season will kick of March 18 in Melbourne. Until then, do enjoy the lovely track of Pau (too short for F1 races - which is sad). Back in 1998 Montoya created history by lapping everyone. You can see it all in this two part YouTube playlist. When writing about Montoya I just cannot forget the fastest F1 lap ever. Just listen for the down shifts and how nice the car handles when pressed through variante Ascari. Just beautiful!


A little poem that makes me smile for all of you.

This Be the Verse

They fuck you up, your mom and dad.
They may not mean to, but they do.
They fill you with the faults they had
And add some extra, just for you.

But they were fucked up in their turn
By fools in old-style hats and coats,
Who half the time were soppy-stern
And half at one another's throats.

Man hands on misery to man.
It deepens like a coastal shelf.
Get out as early as you can.
And don't have any kids yourself.

-Philip Larkin


What - No Gadgets?!

I just went and saw the new Bond movie Casino Royale. As an engineer and computer geek I really must say that I missed the gadgets - only some medical surveilance tech and a few bugs and trackers. No special seats in the car, not a single stinger missile and just a lot of far too long poker and fighting scenes. The only good thing about it was the classic 007 intro - it had a nice retro feel to it.


Benefits of Italy

As Ariya posts his recipies I just thought I'd share the easiest I know. First, boil some high quality pasta.

Then gently fry some garlic in oil, mix with the pasta and serve with undecent amounts of lovely homemade oliv oil (thanks Renso).

Top with some cheese and enjoy.

It was real fun getting the oil home since I had to check in all fluids. Lots of wrapping and fingers crossed it made it all the way.

Qt 4.2.2

I just installed Qt 4.2.2 and verified that the one bug affecting me is solved. Thanks for fixing #122870. Testing other problems I found that issue #135008 also seems to have been solved - apparently by magic as the bug isn't closed yet.



The last week end my wife and I took the chance to visit her sister in Italy. It was nice going from 10 dgC and rain to 20 odd dgC and sun. Not to mention the feeling of vacation - even though I spent quite a few hours writing. I produced some twelve pages on how to provide help in Qt applications.

The writing is for my book that is more or less official now that it has an ISBN and all. You can even find me if you search for authors on Amazon. Kind of fun - but also stressing. For me, the project is far from done. Many pages to write - and the stress of having to keep the quality.

I have been writing for quite a long time. It all started with the independent Qt tutorial for Qt 3. That got me some jobs writing for the Swedish computer magazine Datormagazin. Since then I've written white papers and an Qt Quarterly article and since the summer I've been working on "The Foundations of Qt Development".

In parallel I've changed jobs and will now try to get closer to the hardware. For the moment I'm building uClinux kernels and configuring Spartan and Virtex FPGAs. Great fun! I've also been assigned to do seminars on this - I recently spoke at FPGA World in Kista/Stockholm. What I'm trying to say that there is quite alot of writing-ish tasks at work too.

Anyway - over the last four or five months I've developed a working process that gets me fairly productive. It starts with an outline, pinning down the important issues to cover. After that I design examples to cover everything that I need - and adding details to the outline from doing the examples. Finally, the exhausting part is converting five-six pages of outlines into twenty-twenty five pages of quality text with the right parts of the example sources included. The last phase is best to do in one go - or at least as few gos (goes?) as possible. That means that after that I need to relax, work less for a day or two and just let the brain have some leasure time.

This brings me back to Saturday evening, Firenze - the last minutes of a warm summer evening.