Cross-platform GUI development Library)

Source: Internet
Author: User
Tags wxwidgets

This article is a bit professional and can be used without development.

As a cross-platform GUI library, QT is an old generation (it is said that TK is the first real cross-platform GUI development kit. I don't know whether it has been verified, but I wrote the interface using scripts, this does not seem to be the mainstream ). Searching for "cross-platform GUI development" on the Internet should be able to get a lot of articles comparing various development kits. Here I will talk about my feelings:

Qt (http://www.trolltech.com /)
My favorite things are commercial things with no bugs, detailed documents, and easy-to-understand API interfaces. They provide perfect support for Windows, Linux, and MACOs. After learning about the world of MFC, I found that QT is a fresh paradise for programmers-it is comfortable. To be precise, QT is a complete application development library, not just a GUI. For example, threads, databases, and sockets all have corresponding encapsulation. The first time I came into contact with QT is the qtopia environment on PDA. qtopia is actually a lot of application software integrated in QT embeded (Linux QT without xwindows) systems. It is like Windows Mobile, the main applications are available, and users can also decorate their own small programs. Now QT has been released to version 4.4. It is said that the major change relative to version 3 is the support of vector graphics, which I have never used. Google Earth is the use of QT, you can see the qt-mt338.dll DLL file, it shows that it uses 3.3.8 version with multi-thread support QT.

Moto used the qtopia environment on high-end Linux phones, such as a600 and a680. At that time, qtopia was the only commercial Linux solution in the embedded GUI field. GTK on framebuffer was not so stable, later, Moto and a group of Japanese companies engaged in the limo Foundation, dedicated to using GTK/framebuffer for Linux Solutions. When trolltech was acquired early this year, Moto said QT was less important to them and I believe it is a fact.

GTK (http://www.gtk.org /)
This should be the most widely used now, lgpl release. To be honest, I don't like this thing. In terms of encapsulation and API, QT is not doing well, and the program must also have a series of dependent packages of ATK and pango. Wireshark (the original Ethereal) is developed with GTK, so it is also used for Windows GTK to be transplanted to Windows, check the DLL file in the wireshark installation directory to know how much GTK depends on. It is not easy to develop. After talking about so many GTK bad things, let's just say, gtkmm is a gtk c ++ package, which is doing well. At first glance, we know that the Code style should be modern, I don't know what this mm means. GTK-based GNOME desktop environments now have commercial support from sun, RedHat, and Ubuntu, so the stability is better. Unlike the QT-based Kde, it seems that there has been no commercial support, and it is not surprising that the decline in the desktop environment is getting worse. I suspect that commercial companies do not really like GPL, GTK is lgpl, and commercial companies like it very much. GTK-based software can be used if it doesn't want to open source any day. After QT is switched from qpl to GPL, there is not much commercial support. If these big companies build a basic architecture, they will use GPL to make others use my stuff, improve their influence, and open-source companies will also need to use it. If it is a business-layer software, none of the products of large companies are open-source. Well, it's far away. GTK is also a good thing. Firefox uses it. I have never used it for large-scale development and said so many bad things. It is estimated that the RP value has declined.

WxWidgets (http://wxwidgets.org /)
The name is wxwindows, which is also good. In terms of API and programming style, the imitation of MFC is heavy, but many packages are more advanced than that of MFC. As an open-source community maintenance product, the documentation is quite good. It is easy to switch from MFC to this. The development community has been active, and an XRC extension can be used to define the interface in XML. This should be the most cross-platform development kit. However, the Code Quality of wxWidgets is still different from that of QT. I found two bugs in the development process (as if the version was 2.4 at that time), but the bug is not hidden, in general, wx is doing quite well. Even Apple's MACOs has its own running environment by default, which shows its influence. In addition, wx has made a good Python binding since the beginning, called wxpython. It is updated synchronously with wx itself. Basically, it is now the preferred GUI library for python interface development. For example, the original BitTorrent interface is written in wxpython. Although pyqt and pygtk are both developing and used by others, the popularity of Python seems to be inferior to that of wxWidgets. As mentioned above, writing interfaces using scripts does not seem to be mainstream, but it is hard to say this after the rise of Python. In addition, wxWidgets on X11 has three versions. One is to directly use wxx11 of the X library, and the other is GTK-based wxgtk, there is also a Motif-based wxmotif (not very active in development ). Wxgtk should be stable.

Fox toolkits (http://www.fox-toolkit.org /)
To be honest, I have never used it. It seems that it has been still active. After all, the current GUI library is powerful.

 

The following is my comparison:

QT is the best one. Stable. A development kit can handle all of them. The bad thing is that compilation is slow, rather slow, and C ++ is a common problem. Qt embedded should be the first Linux graphics environment without XWindow, like one. To learn about GUI development in Linux, we should start with this. You can even use the QT plug-in for VC development. After the program is re-compiled in Linux, it will be OK.
GTK and APIs are relatively complicated, but they have an advantage in memory usage. Here we will scold you for the XWindow. the applet on a toolbar will reside in 10 MB of memory, which is too bad. The gtkmm package is good. The development of GTK programs in windows is not as convenient as QT, so it is complicated to set up the environment. It should be developed in Linux.
WxWidgets: It is certainly used to port the MFC program to Linux. Or if you are writing an interface program for python, use ulipad and a python Integration Environment written in wxpython.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.