Qt 2.x and Python 1.6 bind together well

April 13, 2001, 03:30 PM —  Unix Insider — 

In principle, the X Window system provides a programming interface for all Unix and many other operating systems. However, X Window is too low level to be practical for most projects, which is why dozens of higher-level abstractions have been defined to simplify GUI construction.


Most GUI toolkits for Unix are presented through their C programming interfaces or, occasionally, with Java. But the number of toolkits available to Python programmers is remarkable, which is one of the reasons we believe Python is a far better vehicle for exposition and most development. One of the most interesting of these toolkits, PyQt, has just become even more interesting.

What Qt 2.x gives

Version 0.12 of PyQt supports Qt 2.x. Qt is the full-featured, Unicode-aware, cross-platform, theme-configurable toolkit from Troll Tech that's the basis for the upcoming KDE2 desktop for Unix. Qt provides an abundance of widgets, customizable features, high-quality documentation, and extensibility. We detail its capabilities below.


Conventional programs operate best with the Roman alphabet and the English language. Unicode, however, is a relatively new encoding standard that makes it practical for programmers to manage almost any human language. Qt supports Unicode on all platforms.


While much of Qt's early buzz came from Linux practitioners, the toolkit is equally at home with any Unix or Windows OS. Variations are also available for QNX and a few other specialized OSs.


You can customize Qt with colors and fonts, and you can customize the shape of each widget. Your application can, at the runtime request of the user, look like a Windows application, a Motif, or a CDE, and if you want to imitate NextStep, Mac OS, or Swing, it's straightforward to create code that does just that.

Figure 1. Qt offers a wide array of typefaces and fonts


Several important products already rely on Qt, including the KDE and KDE2 desktops, Kylix, YAST 2, QCad, and the Opera browser.


On a technical level Qt is a C++ library with support for interesting features including signals and slots. Slots, which can be thought of as a kind of weak reference, do the work in Qt that callbacks accomplish for other GUI toolkits. Slots promote better type safety than do callbacks, and they are especially handy for model-view-controller (MVC) designs. MVC is widely recognized as a clean, rational, object model that naturally expresses sound GUI design.

Qt for Python

C++ programmers aren't the only ones enjoying Qt's benefits.

Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world

I like it!
Post a comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
peer-to-peer

Esther Schindler
If the comments are ugly, the code is ugly

claird
SVG a graphics format for 21st century

pasmith
Take Chrome OS for a test spin

Sandra Henry-Stocker
Solaris Tip: Have Your Files Changed Since Installation?

sjvn
64-bits of protection?

jfruh
Android fragments vs. the iPhone monolith

mikelgan
What Gizmodo missed about the Pro WX Wireless USB disk drive

 

Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325

Join the conversation here

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace