The problem got sorted out at qtcentre.org The link for this is available at: http://www.qtcentre.org/forum/f-kde-programming-7/t-kdeqwt-doubt-on-debian-sarge-6574-post35348.html#post35348 Thanks to Kevin too for his help. KApplication instance was the real requirement to use the widget. I had tried putting KApplication too but didn't know KCmdLine initialisation is needed so it had not been compiling!! Now it compiles and works like a charm