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, ...

Get End to End GUI Development with Qt5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.