O'Reilly logo

Introduction to Python® Programming and Developing GUI Applications with PyQT by B. M. Harwani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Basic Widgets

In this chapter, we will focus on a few basic widgets. These enable the user to choose one or more options and select integer or float values from a specified range. Not only will you learn how to display options to the user but also how to add, delete, or modify existing options. We will cover the following in this chapter:

  • Using radio buttons

  • Using checkboxes

  • Entering integer and float values using a spin box

  • Scroll bars and sliders

  • Working with List widget

Let’s begin the chapter with radio buttons.

Using Radio Buttons

To display selectable options that are mutually exclusive (selecting one option automatically deselects other options in the group), you use Radio Button widgets, which are instances of the QRadioButton class. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required