PySideSimplicissimus Module 6 AlternativeCombine

From Qt Wiki
Revision as of 16:30, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

English French [qt-devnet.developpez.com] 日本語

Alternative Combine

We call this program combine_alter.py. Actually it does no more and no less than the combine.py program, though it does it somewhat differently – it circumvents the multiple inheritance. Though multiple inheritance is a nice Python feature, many programmers, particularly those migrating from other language may well prefer to avoid it, because Python is almost unique in its support of multiple inheritance (note that C++ does support it, but not Java, C# or other usual object-oriented languages). Though we started of with multiple inheritance, some may well prefer this or some other alternative way. By using the name of combine_alter.py we show that its difference from combine.py by appending “_alter” to the name. The combine.ui and qrc_combine.py programs remain unaltered, so we simply use them without bothering to make it available from an upload. The program itself is available from the usual place

All current source code for “Close”, “About”, “Show Licence”, all versions of “Combined”, “Engineering Application” aka “truss” are stored in one repository tuts4pyside. For your convenience, please install a copy of the repository with the following command:
Program listing follows.

Basically, it is a matter of taste which method one uses – with multiple inheritance or without. Anyhow, it may well be easier ot adopt one or the other. Even though, it is good to have some familiarity with both methods, as one meets both when reading programs.

Enjoy the slightly different presentation of this very basic program setup! Return to PySideSimplicissimus

Categories: