简体   繁体   English

在Qt上使用KDE库

[英]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). 我相对较新的Qt(相对较新我的意思是我在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? 我想使用Qt处理KDE游戏并遇到像kapplication.hKMainWindow等等。如何在Qt上使用它们,它们与Qt中相应的QApplicationQMainWindow有何不同?

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. 不同之处在于这些头文件是针对KDE开发库的,不知道如何使用这些库我认为将它们用于更好地将程序集成到KDE桌面是合理的。 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. 如果您要使用这些头编写程序,那么如果您想在Gnome或XFCE等GTK环境中使用该程序,则必须包含KDE运行时库。 This adds unnecessary dependencies to your program when you could just use straight Qt libraries in lieu of the KDE libraries. 当您可以使用直接Qt库代替KDE库时,这会为您的程序添加不必要的依赖项。 Unless your program is explicitly intended to run on KDE then I would advise using Qt. 除非您的程序明确打算在KDE上运行,否则我建议使用Qt。 But if you wanted to tailor your application to a KDE environment then the KDE libraries would be a good choice. 但是如果你想将你的应用程序定制到KDE环境,那么KDE库将是一个不错的选择。

In short, if you're targeting Windows, Gnome, XFCE, Cinnamon, KDE etc... then Qt. 简而言之,如果你的目标是Windows,Gnome,XFCE,Cinnamon,KDE等......那么Qt。 If KDE is your choice solely, then use these headers. 如果您只选择KDE,请使用这些标题。 Hope that helps. 希望有所帮助。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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