Return to Outils Informatiques – M2 MAI

Outils Informatiques – M2 MAI – TP Qt

Outils Informatiques – M2 MAI – TP Qt and forge

A very simple application: computing squares

1. Direct update

Create an application as illustrated in the following image. Each time the input value is changed, the output value is updated, as the square of the input.

A possible way is to use QtCreator, create a new Qt application, create an inputChanged slot and an outputChanged signal in the mainwindow, and connect them to the SpinBoxes.

2. Deferred update

Add an update button to the application, so that the output is not changed each time the input changes, but only when the button is pressed, as illustrated in the following figure.

A more complex application: solving equation systems

The program given in the following archive sets up an equation system for solving an optimization problem. 05_input_equation_system_size.

The unknowns represent the values of a function. We solve a system to impose some values while making the function as linear as possible. The result is a piecewise linear function.

The user sets the number of values. Three constraints are set at the first, last, and middle points. The right-hand side of the equation system and the result are output in a table.

Do the following changes to the program:

  1. output the four vectors used in the computation, in a table integrated in the main window, as illustrated below
  2. Use vectors c and v as inputs to impose constraints

Using sourceforge

Create a sourceforge account and put your project equation system on it. Share your project with user ffaure.