• Keine Ergebnisse gefunden

Exercise 8: Using Timer Objects Winter Term 2018/19

N/A
N/A
Protected

Academic year: 2021

Aktie "Exercise 8: Using Timer Objects Winter Term 2018/19"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Exercise 8: Using Timer Objects

Winter Term 2018/19

Generally, a graphical user interface responses to user actions, such as a mouse click on a button.

This scheme does not work, if the programmer would like to run a periodic background process, such as a simulation, that might be modified or quit by the user. In such cases, timer objects can help.

Unit 1: Reuse the traffic light application from Exercise 4. Change the program such that it displays its current state within a widget. Then, use a timer object that let the traffic light advance to the next state every two seconds.

Hint: In order to see something useful on the screen, you should take a look at the following method:QWidget::setFixedSize().

Unit 2: Implement a stopwatch that should contain astop-button, a start-button, and a display (QLCDNumber) that displays the elapsed time in seconds.

Have fun, Theo and Ralf

1

Referenzen

ÄHNLICHE DOKUMENTE

Some of the member states benefit from reductions in some of the resources, particularly the UK with the rebate, which is roughly two-thirds of the net contributions to the

Uses of HEU other than for nuclear weapons are as fuel in civilian research reactors, as base material for the production of special isotopes used in medical diagnostics,

Unit 1: Go to the University’s home page www.uni-rostock.de and find the current term dates (Vorlesungszeiten).. Unit 2: Go to the faculty’s home

Design a graphical user interface for such a notepad application that incorporates the considera- tions discussed above.. Use paper and a pencil to arrange the layout of your

Unit 10: Go to the University’s home page www.uni-rostock.de and find students sports recreation’s home page (Seite des Hochschulsports).. Unit 11: Go to the University’s home

Shift LM set temporary marker at positive zero crossing nearest to the cursor Alt Shift LM set temporary marker at zero crossing nearest to the cursor Ctrl Shift LM set

This exercise sheet aims to assess your progress and to explicitly work out more details of some of the results proposed in the previous lectures. Please, hand in your solutions

Sehen Sie einen Zusammenhang mit der