Introduction to Python GUI library better than other toolboxes

Source: Internet
Author: User
Tags python list

If you want to know more about the Python GUI Library and the Operation Skills in practical applications, you can go through our articles to learn more about the relevant content, I hope you will find the knowledge you want about the Python GUI library in the related content Introduction.

Qt toolkit is a widely used cross-platform GUI toolkit for Windows, Linux, Mac OSX, and many handheld platforms. QT has a well-structured but flexible object-oriented structure, clear documentation, and intuitive APIs. David Mertz and Boudewijn Rempt discussed the Qt library and focused on PyQt bindings that allow Python programmers to access the Qt function.

In general, selecting a GUI toolbox for an application is tricky. A programmer can use a wide variety of GUI toolboxes, and each toolbox has its own advantages and disadvantages. Some are faster and smaller than other toolboxes; some are easy to install, and some are more suitable for cross-platform use. In addition, some support specific features that you need to meet ). Of course, various databases have various licenses.

  • How to compile an exe file in Python
  • How does a Python game solve the inconvenience caused by game operations?
  • How to reference arrays in the Python list
  • Tips for implementing Java operations in Python"
  • Python multi-dimensional array code "Ultimate Edition"

For Python programmers, the default GUI option is to bind Tk through Tkinter.)-The reason is obvious. Tkinter and idle IDE are compiled by the Python founder and appear as the default choice for most Python distributions. The standard Python document discusses Tkinter, but does not involve any other GUI bindings.

This is intentional! At least so, if Tk and Tkinter are not so bad, programmers have no reason to look for alternatives. To induce a Python programmer to give up the default option, the toolbox must provide additional information. PyQt is such a toolbox.

PyQt has many advantages over Tkinter and has several disadvantages ). Qt and PyQt are fast. The design of Qt and PyQt is completely object-oriented. Qt provides a well-designed set of window components, which is much larger than that provided by Tk. In terms of its disadvantages, Qt licenses are more restricted than many toolboxes, at least on non-Linux platforms;

Correct installation of Qt and PyQt is often complicated. In addition, Qt is a very large library. Users of the PyQt application will need to try to install Qt and PyQt, which makes distribution very difficult. Read the Qt binding for other languages later in this article .)

PyQt strictly follows the licensing of Qt. In particular, it can be used for GPL on UNIX/X11 platforms and for Qt Palmtop Environment on Zaurus, there are also free-as-in-free-beer Windows software packages for older Qt versions. PyQt commercial licenses can be used for Windows.

For this article, PyQt is better than many other toolboxes and deserves our special attention. Qt uses a mechanism called signal/slot signals/slots) to transmit events and messages between window components and other objects. This mechanism is totally different from the callback mechanism used by most toolboxes, including Tkinter. It is much easier to control communication between objects using signal/slot in a flexible and maintenance manner than to use a fragile callback style. The larger the application, the more important this advantage of Qt.

Boudewijn Rempt, one of the authors of this article, has published a book on application development using PyQt. GUI Programming with Python: QT Edition see references) shows how to design and develop a complete GUI application, including the entire process from initial conception to delivery.
 

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.