Linux GUI development

和自甴很熟 提交于 2019-12-17 19:16:33

问题


I have a large GUI project that I'd like to port to Linux. What is the most recommended framework to utilize for GUI programming in Linux? Are Frameworks such as KDE / Gnome usable for this objective Or is better to use something more generic other than X?

I feel like if I chose one of Gnome or KDE, I'm closing the market out for a chunk of the Linux market who have chosen one over the other. (Yes I know there is overlap)

Is there a better way? Or would I have to create 2 complete GUI apps to have near 100% coverage?

It's not necessary to have a cross-platform solution that will also work on Win32.


回答1:


Your best bet may be to port it to a cross-platform widget library such as wxWidgets, which would give you portability to any platform wxWidgets supports.

It's also important to make the distinction between Gnome libraries and GTK, and likewise KDE libraries and Qt. If you write the code to use GTK or Qt, it should work fine for users of any desktop environment, including less popular ones like XFCE. If you use other Gnome or KDE-specific libraries to do non-widget-related tasks, your app would be less portable between desktop environments.




回答2:


I recommend wxWidgets or Qt. They are both mature, well-structured and cross-platform, with decent documentation and sample source code.




回答3:


Gnome apps work on KDE desktops and vice versa; you won't be locking anyone out. As far as toolkits go, it's fairly subjective. All of the toolkits are fairly cross-platform. If you're not open source, then GTK+ would be the cheaper option, as Qt is only free for open source use, whereas GTK+ is LGPL.




回答4:


Have you thought of using Mono? Programs like Paint.NET work great under Linux & Windows.



来源:https://stackoverflow.com/questions/35762/linux-gui-development

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