My blog has been moved to

Friday, March 20, 2009

I was blindfolded but now I'm seeing

Two (old) tricks for the price of one. Well, since it takes two to Tango anyway.

The first is to make your window movable by dragging, especially if the window does not have a title bar (remember the classic WinAmp?) or use a custom-drawn one (Google Chrome is the prominent example here). To make the challenge more difficult, no change to the main window code is allowed. To reveal the secret (which is a matter of using event filtering properly), go to my Qt Labs blog entry: Moving top-level window by dragging.

To see it in action, peek at the following screencast (alternatives: YouTube,, 3.7 MB Ogg Theora).

The second is about Google Suggest. Almost all browsers have supported it. For a minimalistic example on how to do it, check out my other Qt Labs blog on Google Suggest made easy. The demo launches your default browser with the chosen search term, with or without autocompletion.

The proof lies in this short screencast (alternatives: YouTube,, 450 KB Ogg Theora).

(It is evident that my default browser is Konqueror. I told you I am not that biased :-)

Now just like last time, who is going to turn this into a plasmoid?


Pinheiro said...

great that make ist possible to remove alot of superfulus decorartion on the windeck couse any free sapce in the window can be used to move it around.... coool

Fri13 said...

Well, I have used this kind feature now by the Bespin theme for KDE4. It allows you to move windows almost anywhere where is free space.

But what I always miss for on other desktops (Mac OS X and Windows) is the Metakey + LMB combination. And even more the Metakey + RMB to resize window.

Zack said...

That's very nice.

But just so that you know saying that you use Konqueror as your default is quite ridicules. It's just like Linux kernel hackers saying that "they're so not biased that they all use Windows by default", and all KDE core hackers saying "we're so not biased we all use Gnome as our default". There's so many things that are quite frankly still just broken in QtWebKit, how are you planning to fix and spot them if you keep using other engines as your default web browsers? Have some pride in your work and eat your own dog food.
Honestly I just don't think it's terribly productive to have you spend your time on QtWebKit if you yourself, after two releases still don't use it as the default.

Ariya Hidayat said...

@Zack: I understand your concern. I also hope you notice the smiley and the referred blog post to realize how I am in the sarcasm mode in that context.

Right after this, Google Suggest has just been added to Arora.