Book Image

Learning Robotics using Python

Book Image

Learning Robotics using Python

Overview of this book

Table of Contents (19 chapters)
Learning Robotics Using Python
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with PyQt and PySide


After installing the PyQt and PySide packages, we can see how to write a Hello World GUI using PyQt and PySide. The main difference between PyQt and PySide is only in some commands; most of the steps are the same. Let's see how to make a Qt GUI and convert it into Python code.

Introducing Qt Designer

Qt Designer is the tool for designing and inserting control into Qt GUI. Qt GUI is basically an XML file that contains the information of its components and controls. The first step to work with GUI is its designing. The Qt Designer tool provides various options to make excellent GUIs.

Start Qt Designer by entering the command designer-qt4 in the terminal. The following image shows what you will be able to see after running this command:

The preceding image shows the Qt designer interface. Select the Widget option from the New Form window and click on the Create button. This will create an empty widget; we can drag various GUI controls from the left-hand side of Qt 4...