Skip to content
Tino Pyssysalo edited this page Jun 17, 2018 · 16 revisions

Week 4 - C++ and QML (20h)

Objective: How to communicate between C++ and QML

4.04 QML Plugins (P0 | 2h)

Objective: Right way of doing registratoin

Objective: Deriving good types for QML

Objective: Tree model

  • Pages: 201

Objective: List vs Tree

  • Pages: 204-217

4.09 Shapes (?? | ??)

4.11 QPainter (P1 | 3h)

Exercise for Part 4 - Gallery Application

Implement a gallery application, which allows user to manage images, which are read from any URL. The application should contain several views: one view to show image thumbnails, one to show an image in the larger size, and a view to capture images with a camera.

  • Use Qt Quick Controls 2, whenever possible.
  • Implement a read/write model to store image details. The model must be derived from QAbstractTableModel. It should have at least two columns: an image url and an image name. The model object should be a singleton.
  • The main view should show the images from the model. Use PathView to show image thumbnails and image names. The user must be able to remove images by pressing a 'D' key or clicking on a delete button in the view delegate.
  • If the image is clicked on or touched, show another view with a larger version of the thumbnail. Implement a magnifying glass to this view. It can be a simple mouse click, which scales the image up or down. Implement functionality to navigate back to the previous view as well.
  • There should be three ways to add new images to the model. A file dialog, a query dialog or a camera. Implement the camera capture to its own view. The query dialog simply asks the user for the image URL and name.
  • Notify the user in a message dialog about (un)successful user interactions: image added to the model, image addition failed, camera not available etc.
Clone this wiki locally