Install PySide and PyQt on Windows, Mac and Linux

In the last article, I introduced you to Qt and its Python interfaces, PyQt and PySide; now that you know a bit about them, pick one and install it. I recommend PySide for two reasons: first, this tutorial is conceived in terms of PySide, and may cover a few topics that are less fully-implemented in […]

Read More

Intro to PySide/PyQt: Basic Widgets and Hello, World!

This installment gives a introduction to the very most basic points of PySide and PyQt. We’ll talk a bit about the kinds of objects they use, and talk through a couple of very simple examples that will give you a basic idea of how Python/Qt applications are constructed. First, a basic overview of Qt objects. […]

Read More

PySide/PyQt Tutorial: Interactive Widgets and Layout Containers

In the last installment, we looked at some of the functionality provided to all QWidget-descended Qt widgets, and we looked at one specific widget, the QLabel, in more depth. We also worked our way up to an example that illustrated the structure of a simple Python/Qt application. Thus far, however, we’re not able to do […]

Read More

PySide/PyQt Tutorial: Using Built-In Signals and Slots

In the last installment, we learned how to create and set up interactive widgets, as well as how to arrange them into simple and complex layouts using two different methods. Today, we’re going to discuss the Python/Qt way of allowing your application to respond to user-triggered events: signals and slots. When a user takes an […]

Read More

PySide/PyQt Tutorial: Creating Your Own Signals and Slots

You don’t have to rely solely on the signals that are provided by Qt widgets, however; you can create your own. Signals are created using the Signal class. A simple signal definition would be: Then, when the conditions for the object being tapped are satisfied, you call the signal’s emit method, and the signal is […]

Read More

PySide/PyQt Tutorial: The QListWidget

Qt has a couple of widgets that allow single-column list selector controls — for brevity and convenience, we’ll call them list boxes. The most flexible way is to use a QListView, which provides a UI view on a highly-flexible list model which must be defined by the programmer; a simpler way is to use a […]

Read More

PySide/PyQT Tutorial: QListView and QStandardItemModel

In our last instalment, we discussed Qt’s QListWidget class, which allows the user to make simple single-column list boxes. For more advanced list controls, however, a more flexible widget is required; for that reason, Qt supplies the QListView widget, which allows more varied items to be created. It is a pure presentation widget, which displays […]

Read More

PySide/PyQt Tutorial: QWebView

The QWebView is a highly useful control; it allows you to display web pages from URLs, arbitrary HTML, XML with XSLT stylesheets, web pages constructed as QWebPages, and other data whose MIME types it knows how to interpret. It uses the WebKit web browser engine. WebKit is an up-to-date, standards-compliant rendering engine used by Google’s […]

Read More

How to Initialize a 2D List in Python?

The list is a data structure that is used to store multiple values linearly. However, there exist two-dimensional data. A multi-dimensional data structure is needed to keep such type of data. In Python, a two-dimensional list is an important data structure. It is essential to learn the working of Python 1D list efficiently to work […]

Read More

X Python Tricks You Should Start Using In 2021

Python is an object-positioned, sophisticated programming language with semantics that are active and effectively beneficial in 2021. It is built on a high level in several data structures that are combined with dynamic language typing and binding it all together. When you want to bind and connect existing components, it is used as scripting and […]

Read More