@@ -73,12 +73,7 @@ DelegateChooser {
7373 strongInteractive: model .strongInteractive
7474 contentIcon: model .contentIcon
7575 contentRowCount: model .contentRowCount
76- property string defaultAction: model .defaultAction
77-
78- function invokeAction (actionId ) {
79- console .log (" action normal" , model .id , actionId)
80- notifyModel .invokeAction (model .id , actionId)
81- }
76+ defaultAction: model .defaultAction
8277
8378 Loader {
8479 anchors .fill : parent
@@ -98,13 +93,6 @@ DelegateChooser {
9893 }
9994 }
10095
101- // default action
102- TapHandler {
103- enabled: model .defaultAction !== " "
104- acceptedButtons: Qt .LeftButton
105- onTapped: invokeAction (model .defaultAction )
106- }
107-
10896 onSetting : function (pos ) {
10997 let tmp = mapToItem (root .view , pos)
11098 root .setting (tmp, {
@@ -116,8 +104,13 @@ DelegateChooser {
116104 console .log (" remove normal" , model .id )
117105 notifyModel .remove (model .id )
118106 }
107+ onDismiss : function () {
108+ console .log (" dismiss normal" , model .id )
109+ notifyModel .remove (model .id )
110+ }
119111 onActionInvoked : function (actionId ) {
120- invokeAction (actionId)
112+ console .log (" action normal" , model .id , actionId)
113+ notifyModel .invokeAction (model .id , actionId)
121114 }
122115 }
123116 }
@@ -141,6 +134,7 @@ DelegateChooser {
141134 strongInteractive: model .strongInteractive
142135 contentIcon: model .contentIcon
143136 contentRowCount: model .contentRowCount
137+ enableDismissed: false
144138
145139 Loader {
146140 anchors .fill : parent
0 commit comments