Gui for KDE and Gnome [duplicate]

为君一笑 提交于 2019-12-05 22:09:01

You can compile and link to Qt statically (I've seen this on Windows, don't know how it works on Linux). Qt applications can look native on GNOME desktop environment through the use of qgtkstyle.

wxWidgets uses GTK+, if you want to have it look nice on KDE you need to have a GTK theme which uses Qt for rendering like qgtkstyle is for GNOME. qgtkstyle is incorporated into Qt while the other option is from a 3rd party.

I've found that Gtk+ apps come closer to looking right in KDE than Qt apps do in Gnome, but not by enough to matter. Both options look and feel like they belong, provided the libraries are available on the system (more common that you might think) or they are statically linked (not sure that this is allowed with Qt) as mentioned above.

Secondly, wxWidgets will still use Gtk+ in KDE, requiring the same libraries to be loaded as if you wrote the application strictly using Gtk+ in addition to wxWidgets. It really is a fantastic choice though as it's easy to use and works well in many environments. This should give you an idea of how applications will look between desktop environments:

http://www.wxwidgets.org/about/screensh.htm

I think what is more important is which will fit your coding style and application better. Qt and Gtk+ can be quite different in many regards.

Krish is right !

If your aim is to make a cross-platform application, use a library like wxWidgets.

If you decide to use Qt for example, users running on Gnome will download some libs and it'll work fine. This is transparent when the distribution have a package manager but more difficult if it doesn't.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!