O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

When I check available groceries

After having checked that the app's initial state for our particular scenario is satisfied, we want to simulate a user-initiated action to trigger the use case.

As always, there are many ways we can implement this. For example, we could create a CheckAvailableGroceries class and call some action method (for example, run()) to trigger the logic manipulations that will ultimately result in the Then steps (the scenario outcomes) being fulfilled. Another way is to create a collection of all possible system actions (both user- and system-initiated) in a file, and make use of Qt's signals and slots communication system to fire the actions and handle them in a listening class instance. Alternatively, we could implement ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required