Category Archives: PyQt GUI Programming

Python Mini Ludo 20 Game in PyQt

Python Mini Ludo 20 Game – This PyQt-based game allows two players to take turns, roll dice, and compete to reach position 20. It provides a simple and interactive way to play a virtual Ludo-style game. Source Code import sys import random from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QHBoxLayout, QLabel, QMessageBox from PyQt5.QtGui import… Read More »

Loading

Python PyQt Gallons To Liters Conversion GUI Program

Python PyQt Gallons To Liters Conversion GUI Program – This code creates a simple PyQt GUI program with a main window, a label, an input field, a “Convert” button, and a label to display the result. When you enter the number of gallons and click the “Convert” button, it calculates the equivalent amount in liters… Read More »

Loading

Python PyQt Calculator GUI Program

Python PyQt Calculator GUI Program – This program is a PyQt-based calculator application that provides a graphical user interface (GUI) for performing basic arithmetic operations and includes a “Square Root” button (SQRT) to calculate the square root of a number. Here’s a breakdown of the program’s functionality and structure: Importing Required Libraries: The program starts… Read More »

Loading

Python PyQt Weight Converter Pounds and Kilograms

Python PyQt Weight Converter Pounds and Kilograms – This code creates a PyQt application with two radio buttons for selecting the conversion type, updates the labels accordingly, and performs the conversions based on the selected option. It assumes the conversion factors are 0.45359237 for pounds to kilograms and 2.20462 for kilograms to pounds. This code… Read More »

Loading

PyQt Four Function Calculator

PyQt Four Function Calculator – To create a PyQt program with three QLineEdit widgets for input, labels, six buttons for performing mathematical operations (Add, Subtract, Multiply, Divide, Clear, Exit), and a third QLineEdit widget for displaying the result, you can use the following code: import sys from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit,… Read More »

Loading

PyQt Program To Add Remove Clear Items From List

PyQt Program To Add Remove Clear Items From List – Source Code import sys from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QLineEdit, QListWidget, QLabel class FruitListApp(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.setWindowTitle(‘Fruit List’) self.setGeometry(100, 100, 400, 300) self.fruit_list = QListWidget(self) self.add_button = QPushButton(‘Add Fruit’, self) self.remove_button = QPushButton(‘Remove Fruit’, self) self.clear_button = QPushButton(‘Clear… Read More »

Loading

PyQt Introduction and Features

PyQt Introduction and Features – PyQt 5 is a popular Python library for creating desktop graphical user interfaces (GUIs) and applications. It is a set of Python bindings for the Qt application framework, which is a powerful and widely-used C++ framework for developing cross-platform applications. PyQt 5 provides a bridge between the Python programming language… Read More »

Loading