Developing GUIs
using PyQt
- GDG VIT, Vellore
What is a GUI?
A GUI or Graphical User
Interface is a medium for a
user to interact with a
computer and its
components through
windows, buttons and so
on..
Different modules
available to develop
GUIs
➔ PyQt
➔ Tkinter
➔ Kivy
➔ WxPython
Why PyQt..
➔ Free Availability
➔ Cross - Platform
➔ Multi - Language Support
➔ Qt Designer
Creating a Window
Geometry Managers
➔ .move()
◆ Places the window at an absolute position on the
screen.
◆ Takes two parameters x and y to locate position.
◆ Example usage:
instanceName.move(x = 10, y = 10)
Geometry Managers
➔ .resize()
◆ Resizes the window’s/application’s dimensions.
◆ The .resize() method also takes two parameters, say x
and y, to set the width and the height of the window.
◆ Example usage:
instanceName.resize(x, y)
Geometry Managers
➔ .setGeometry()
◆ Combines both, .resize() and .move()
◆ Takes 4 parameters, two to represent the placement
of the window on the screen and the rest two to
represent the dimensions of the window itself.
◆ Example usage:
instanceName.setGeometry(xScreen, yScreen, width,
height)
Creating a Button
Adding a Tooltip
Creating a Label
Creating a Text Field
Creating a Check Box/Button
Creating a ComboBox
Thank You!