View Full Version : problems using kwindowsystem.h class

8th April 2011, 22:45

I have a problem when I include kwindowsystem.h file into a new project, The message error says "No such file or directory". I am using Kubuntu 10.10 and developing on QtCreator 2.1.0. I think that the problem is because I have to install some kde library and add it to my Makefile, but I don't know which library is and neither how to add it to my Makefile.

Please somebody help me with this problem

Thanks very much

9th April 2011, 07:44

search for *-dev packages, install them, use 'find' to locate the header files if you don't know where they are getting installed and then read the part about dynamic libraries in the Qt Documentation. (LIBS and INCLUDEPATH)

11th April 2011, 22:23

thanks very much for your help, it really works, I only had to install kdelibs5-dev and the header file appear in /usr/include, now am going to continue with the developing

Added after 1 36 minutes:

well, as I said in the previous post, it compile fine, but the problems start when I called a function of KWindowSystem class, this is the code:

#include <kwindowsystem.h>
#include <netwm.h>

... Other functions

void Test::showInTaskbar() {

KWindowSystem::setState( winId(), NET::SkipTaskbar );


the error message is this bellow:

/home/saez/qt/taskbar/test.cc:-1: error: undefined reference to `KWindowSystem::setState(unsigned long, unsigned long)'

I saw that code in Knotes code for hide the taskbar entry of the application, that is all that I want to do

can somebody help me ???