Qt Designer - create application GUI (Definite Integral Calculator)

"The only way to learn a new programming language is by writing programs in it." - Dennis Ritchie

Qt Designer - Create Application GUI (Definite Integral Calculator)  


Introduction

Using Qt Designer & python to creating a simple graphical user interface (GUI). You can use Python and the PyQt5 package to create nice-looking user interfaces that you and your users will enjoy 👌

Installing Requirements 

Here’s how to do it:

$ pip install PyQt5

$ pip install PyQt5Designer



Qt Designer, Template of the application 




Creating Simple Applications

You can create a large variety of different cross-platform GUIs using Qt Designer tools. You can create anything from desktop widgets to more & fancy user interfaces. In my example below I start with an easy writing idea to calculate the definite integral.

A definite integral is an integral

$\int^{a}_{b} f(x) dx$




Application General Form


In this app there are two main objects:
  • First to calculate the integral with input, f(x), a and b.    
  • Second, is an optional part for fun, to try to predict the result before you press the calcul button
Here are the few lines of the code:




Examples

Some examples used to test the output results
 


The gamma function is defined via a convergent improper integral





The Gaussian integral, also known as the Euler–Poisson integral





Thank you 😇


"In some ways, programming is like painting. You start with a blank canvas and certain basic raw materials. You use a combination of science, art, and craft to determine what to do with them." - Andrew Hunt



Comments

Popular Posts