@ -46,10 +46,13 @@ Rectangle {
enabled: ViewManager . nextEnabled ;
visible: ViewManager . backAndNextVisible ;
onClicked: { ViewManager . next ( ) ; }
/ / T h i s m a r g i n g o e s i n t h e " n e x t " b u t t o n , b e c a u s e t h e " q u i t "
/ / b u t t o n c a n v a n i s h a n d w e w a n t t o k e e p t h e m a r g i n t o
/ / t h e n e x t - t h i n g - i n - t h e - n a v i g a t i o n - p a n e l a r o u n d .
Layout.rightMargin: 3 * buttonBar . spacing ;
}
Button
{
Layout.leftMargin: 3 * buttonBar . spacing ; / / l i t t l e g a p f r o m b a c k / n e x t
Layout.rightMargin: 2 * buttonBar . spacing
text: ViewManager . quitLabel ;
icon.name: ViewManager . quitIcon ;
@ -59,6 +62,19 @@ Rectangle {
ToolTip.delay: 1000
ToolTip.text: ViewManager . quitTooltip ;
/ *
* The ViewManager has settings -- user - controlled via the
* branding component , and party based on program state --
* whether the quit button should be enabled and visible .
*
* QML navigation * should * follow this pattern , but can also
* add other qualifications . For instance , you may have a
* "finished" module that handles quit in its own way , and
* want to hide the quit button then . The ViewManager has a
* current step and a total count , so compare them:
*
* visible: ViewManager . quitVisible && ( ViewManager . currentStepIndex < ViewManager . rowCount ( ) - 1 ) ;
* /
enabled: ViewManager . quitEnabled ;
visible: ViewManager . quitVisible ;
onClicked: { ViewManager . quit ( ) ; }