Book Image

Pyside GUI Application Development- Second Edition - Second Edition

By : Venkateshwaran Loganathan, Gopinath Jaganmohan
Book Image

Pyside GUI Application Development- Second Edition - Second Edition

By: Venkateshwaran Loganathan, Gopinath Jaganmohan

Overview of this book

Elegantly-built GUI applications are always a massive hit among users. PySide is an open source software project that provides Python bindings for the Qt cross-platform UI framework. Combining the power of Qt and Python, PySide provides easy access to the Qt framework for Python developers and also acts as an excellent rapid application development platform. This book will take you through everything you need to know to develop UI applications. You will learn about installing and building PySide in various major operating systems as well as the basics of GUI programming. The book will then move on to discuss event management, signals and slots, and the widgets and dialogs available with PySide. Database interaction and manipulation is also covered. By the end of this book, you will be able to program GUI applications efficiently and master how to develop your own applications and how to run them across platforms.
Table of Contents (13 chapters)

Implementation of MDI

We have already discussed the differences between SDI and MDI applications in Chapter 3, Main Windows and Layout Management. We saw many implementations of SDI applications. In this section, we will explore a technique of creating MDI applications.

A Multiple Document Interface application will consist of a main window where multiple child windows and dialogs reside and appear for interaction. The central widget can be either the PySide.QtGui.QMdiArea or PySide.QtGui.QWorkSpace widget. They are by themselves widget components that manage the central area of the main window to arrange the MDI windows in a layout. Subwindows are then created and added to the MDI area or a workspace. An example of the MDI application is given as follows:

class MyMDIApp(QMainWindow):
    def __init__(self):

        workspace = QWorkspace()
        workspace.setWindowTitle("Simple WorkSpace Example")

        for i in range(5):