Reply to topic

Development with Qt Creator.

User avatar utkuaydin
KDE Developer
Posts
48
Karma
1
OS

Development with Qt Creator.

Fri Aug 07, 2009 12:53 pm
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:

Code: Select all
/home/utku/Projeler/Progressive/ui_mainwindow.h:43: undefined reference to `KUrlComboRequester::KUrlComboRequester(QWidget*)'


I can't understand where is my mistake. By the way, Qt widgets runs well.

Thanks in advance.
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Development with Qt Creator.

Fri Aug 07, 2009 9:59 pm
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]http://forum.kde.org/content/bcooksley_sig.png[/img]
User avatar utkuaydin
KDE Developer
Posts
48
Karma
1
OS

Re: Development with Qt Creator.

Fri Aug 07, 2009 10:28 pm
bcooksley wrote:Which build system are you using currently?


I'm using QMake. Actually it is default option in Qt Creator.
User avatar bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Development with Qt Creator.

Fri Aug 07, 2009 10:37 pm
Unfortunately I do not know the options, but you could try adding "-lkdeui"


KDE Sysadmin
[img]http://forum.kde.org/content/bcooksley_sig.png[/img]
User avatar kernco
Registered Member
Posts
29
Karma
0
OS
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.
User avatar dpalacio
Registered Member
Posts
240
Karma
2
OS

Re: Development with Qt Creator.

Tue Dec 15, 2009 3:32 pm
Add this to your project file:
LIBS += -L/kde/dir -lkdeui


connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
User avatar utkuaydin
KDE Developer
Posts
48
Karma
1
OS

Re: Development with Qt Creator.

Thu Dec 31, 2009 6:26 am
kernco wrote: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.


OK, thanks. Unfortunately, my distro doesn't support Qt 4.6 ofically yet. I'll try it when I switch to 4.6.
User avatar ComaWhite
KDE Developer
Posts
100
Karma
0
OS

Re: Development with Qt Creator.

Thu Jan 07, 2010 6:59 am
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.


Image
KDE Version: 4.6 (Beta 2) | Qt Version: 4.7.1
Aki IRC Developer http://www.akiirc.org/
andreduartesp
Registered Member
Posts
3
Karma
0
OS

Re: Development with Qt Creator.

Sat Mar 06, 2010 1:54 am
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

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], lrobuck, Sogou [Bot], Yahoo [Bot]