- PyQt5 - Discussion
- PyQt5 - Useful Resources
- PyQt5 - Quick Guide
- PyQt5 - QPixmap Class
- PyQt5 - QClipboard
- PyQt5 - BrushStyle Constants
- PyQt5 - Drawing API
- PyQt5 - Database Handling
- PyQt5 - Drag & Drop
- PyQt5 - Multiple Document Interface
- PyQt5 - QMessageBox
- PyQt5 - QDialog Class
- PyQt5 - Basic Widgets
- PyQt5 - Layout Management
- PyQt5 - Signals & Slots
- PyQt5 - Using Qt Designer
- PyQt5 - Major Classes
- PyQt5 - Hello World
- PyQt5 - What’s New
- PyQt5 - Introduction
- PyQt5 - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
PyQt5 - Basic Widgets
Here is the pst of Widgets which we will discuss one by one in this chapter.
Sr.No | Widgets & Description |
---|---|
1 | A QLabel object acts as a placeholder to display non-editable text or image, or a movie of animated GIF. It can also be used as a mnemonic key for other widgets. |
2 | QLineEdit object is the most commonly used input field. It provides a box in which one pne of text can be entered. In order to enter multi-pne text, QTextEdit object is required. |
3 | In PyQt API, the QPushButton class object presents a button which when cpcked can be programmed to invoke a certain function. |
4 | A QRadioButton class object presents a selectable button with a text label. The user can select one of many options presented on the form. This class is derived from QAbstractButton class. |
5 | A rectangular box before the text label appears when a QCheckBox object is added to the parent window. Just as QRadioButton, it is also a selectable button. |
6 | A QComboBox object presents a dropdown pst of items to select from. It takes minimum screen space on the form required to display only the currently selected item. |
7 | A QSpinBox object presents the user with a textbox which displays an integer with up/down button on its right. |
8 | QSpder class object presents the user with a groove over which a handle can be moved. It is a classic widget to control a bounded value. |
9 | A horizontal QMenuBar just below the title bar of a QMainWindow object is reserved for displaying QMenu objects. |
10 | A QToolBar widget is a movable panel consisting of text buttons, buttons with icons or other widgets. |
11 | This is a preconfigured dialog with a text field and two buttons, OK and Cancel. The parent window collects the input in the text box after the user cpcks on Ok button or presses Enter. |
12 | Another commonly used dialog, a font selector widget is the visual appearance of QDialog class. Result of this dialog is a Qfont object, which can be consumed by the parent window. |
13 | This widget is a file selector dialog. It enables the user to navigate through the file system and select a file to open or save. The dialog is invoked either through static functions or by calpng exec_() function on the dialog object. |
14 | If a form has too many fields to be displayed simultaneously, they can be arranged in different pages placed under each tab of a Tabbed Widget. The QTabWidget provides a tab bar and a page area. |
15 | Functioning of QStackedWidget is similar to QTabWidget. It also helps in the efficient use of window’s cpent area. |
16 | This is another advanced layout manager which allows the size of child widgets to be changed dynamically by dragging the boundaries between them. The Spptter control provides a handle that can be dragged to resize the controls. |
17 | A dockable window is a subwindow that can remain in floating state or can be attached to the main window at a specified position. Main window object of QMainWindow class has an area reserved for dockable windows. |
18 | QMainWindow object reserves a horizontal bar at the bottom as the status bar. It is used to display either permanent or contextual status information. |
19 | QListWidget class is an item-based interface to add or remove items from a pst. Each item in the pst is a QListWidgetItem object. ListWidget can be set to be multiselectable. |
20 | A scrollbar control enables the user to access parts of the document that is outside the viewable area. It provides visual indicator to the current position. |
21 | QCalendar widget is a useful date picker control. It provides a month-based view. The user can select the date by the use of the mouse or the keyboard, the default being today’s date. |