O'Reilly logo

Application Development with Qt Creator - Second Edition by Ray Rischpater

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

Putting it all together – an image gallery application

Let's apply what we've discussed in the last few chapters by putting together a simple image gallery application, such as the photo gallery on smartphones. We'll display images from the system's directory in a grid, letting the user flick to scroll the images. Here's how our application will look:

Putting it all together – an image gallery application

To do this, we need the following components:

  • A model containing the paths to the images to be displayed
  • A controller responsible for creating the model
  • An image provider that can load the images from the system's image directory
  • The QML UI

Let's take a look at the application's QML first:

import QtQuick ...

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