简体   繁体   中英

Using KDE libraries on Qt

I am relatively new to Qt (by relatively new I mean I have developed a few basic applications on Qt). I wanted to work on KDE Games using Qt and came across things like kapplication.h , KMainWindow , etc. How do I use these on Qt and how are these different from the corresponding QApplication or QMainWindow in Qt?

The difference is that these header files are for the KDE development libraries, without knowing too much about working with these libraries I think it would be reasonable to assume that they are used to better integrate your program into a KDE desktop. If you were to write a program using these headers then you'd have to include KDE runtime libraries if you wanted to use that program on a GTK environment like Gnome or XFCE. This adds unnecessary dependencies to your program when you could just use straight Qt libraries in lieu of the KDE libraries. Unless your program is explicitly intended to run on KDE then I would advise using Qt. But if you wanted to tailor your application to a KDE environment then the KDE libraries would be a good choice.

In short, if you're targeting Windows, Gnome, XFCE, Cinnamon, KDE etc... then Qt. If KDE is your choice solely, then use these headers. Hope that helps.

有IDE,使用KDE和qt,KDevelop,你可以在这里查看: http//www.kdevelop.org/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM