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

Removing elements from a composition

We want our users to be able to change their mind and remove elements from the composition to their heart's desire. To achieve this, we need a mechanism to select an already existing element and destroy it. Here is the feature specification:

Feature: Remove element from composition    Scenario: One to zero elements        Given there is a composition with one element in it        And the element is "A"        When I select element "A" from the composition        And I remove the selected element from the composition        Then the composition contains zero elements    Scenario: One to two elements        Given there is a composition with two elements in it        And one element is "A"        And one element is "B" When I select element "A" from the composition ...

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