Book Image

Getting Started with Python and Raspberry Pi (Redirected from Learning Python By Developing Raspberry Pi Applications)

By : Dan Nixon
Book Image

Getting Started with Python and Raspberry Pi (Redirected from Learning Python By Developing Raspberry Pi Applications)

By: Dan Nixon

Overview of this book

Table of Contents (18 chapters)
Getting Started with Python and Raspberry Pi
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Building the UI with Qt Designer


Start by launching Qt Designer using the following command:

designer-qt4

When Qt Designer first loads, you will see the New Form dialog box, as shown in the following screenshot:

Here, select the Main Window option and click Create. You will then see the new window open in the main Qt Designer window, as follows:

The first thing we need to do is to rename the window class name. This is done by first selecting QMainWindow in Object Inspector, and then changing the objectName property in Property Editor to UnitConverter. We will also change the WindowTitle property to "Unit Converter", as shown in the following screenshot:

Next, we will add a menu to the top menu bar of the main window. This will only have a single File menu. To add this, click on the Type Here section in the position of the top menu bar and enter &File. Here, & is used to designate the character that can be used to access the menu using the Alt key.

Add the option by pressing Enter, after...