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)

Chapter 3. Main Windows and Layout Management

In the previous chapter, we saw how to create windows using widgets. Most of the GUI applications that we use today are main window-styled applications, which have a menu bar, toolbars, a status bar, a central widget, and optional dock widgets. Generally, an application will have a single main window and a collection of dialogs and widgets to serve the purpose of the application. A main window provides a framework to build an application's user interface. In this chapter, we shall discuss the creation of a main window application with its predefined components. We will also discuss layout management in a windowed application.

PySide provides a class, named PySide.QtGui.QMainWindow, that is derived from QWidget and its related classes for main-window management. QMainWindow has its own layout to which you can add toolbars, a menu bar, a status bar, dock widgets, and a central widget. The layout description of a main window is as shown in the following...