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

Describing the usecase flow with signals and slots

In order to implement our usecase, as we have seen, we need a way to tell the groceryItems entity to load the list of available items and to sort them in ascending order based on their name. Only then can we declare the usecase as successful.

The standard way of accomplishing this would be to invoke some method of groceryItems to retrieve and sort the items, and then get back a return value, perhaps a boolean indicating whether the method was successful. In a completely synchronous setting this could work OK, but often we might need part of this task to happen asynchronously (as we, for example, want to retrieve the grocery items from a web server without blocking the application's UI). Also, ...

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