including kde classes in qt

Mark Gaiser markg85 at gmail.com
Sun Jan 8 18:20:16 UTC 2017


On Sun, Jan 8, 2017 at 2:12 PM, mayank bansiwal <mayankb8330 at gmail.com>
wrote:

> hello mates.
> i have just started to code with qt creator. I want to contribute to kde
> open source organization which uses qt. Can anyone please tell me how to
> include kde classes in qt ide. I added this syntax in my .pro file
>
> LIBS += -lkdeui
>
> but still it is showing error about kde header files i used.
>

The reason that doesn't work is because LIBS += doesn't add include paths.
You need an includepath as well:
INCLUDEPATH += /some/path

Having said that.
You have also been told here and on the Qt mailing list that kdeui is not
adviced anymore, you should not use it.
You are probably looking for frameworks modules like KCoreAddons,
KGuiAddons or KWidgetsAddons [1].

If you want to use - for instance - KCoreAddons you simply install that
package in your distribution and add this line in your qmake file:
QT += KCoreAddons

That's also described on [1] for every framework.

And it works :)

[1] https://api.kde.org/frameworks/index.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170108/44e749ad/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list