KDE Developer
|
Hello, I'm a beginner C++\Qt developer and I want to develop KDE apps. I've decided to use Qt Creator but I've a problem with it. When I add a KDE widget and try to run it, it fails and gives this output:
I can't understand where is my mistake. By the way, Qt widgets runs well. Thanks in advance. |
Administrator
|
You need to add the appropriate linking instructions to find KDE Libraries.
The easiest way to do this is with CMake. Which build system are you using currently?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
KDE Developer
|
I'm using QMake. Actually it is default option in Qt Creator. |
Administrator
|
Unfortunately I do not know the options, but you could try adding "-lkdeui"
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
If you're using Qt Creator 1.3 (released with Qt 4.6), using cmake is now an option when you create a new project.
|
Registered Member
|
Add this to your project file:
LIBS += -L/kde/dir -lkdeui
connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
|
KDE Developer
|
OK, thanks. Unfortunately, my distro doesn't support Qt 4.6 ofically yet. I'll try it when I switch to 4.6. |
KDE Developer
|
You can use KDevelop4 which supports Qt-4.5 and it handles CMake out of the box (imho better than the current Qt-Creator 1.3) and also QMake. Try KDevelop4 if your distro has it until you can use QtCreator than requires Qt-4.6. And determine which one you like better.
|
Registered Member
|
To start a new project you need to tell qtcreator to use the KDE libraries when building. So, choose File -> New... and create your project. We will call it yourproject here. To be able to use KDE's libraries, go to your home directory, cd into yourproject and modify yourproject.pro. Add a line
LIBS += -lkdeui |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell