Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

SwipeButton

A button with a default style to be used together with SwipeOptionsContainer. More...

Import Statement: import Felgo 4.0
Since: Felgo 2.7.0
Inherits:

AppButton

Properties

Detailed Description

The SwipeButton is a variant of the AppButton control intended to be used together with the SwipeOptionsContainer type. It comes with a default look that matches platform-specific styles.

 App {

   ListPage {
     //some JS array as list model
     model: [{text: "Item 1", detailText: "Detail 1"}, {text: "Item 2", detailText: "Detail 2"}]

     // define the SwipeOptionsContainer as delegate
     delegate: SwipeOptionsContainer {
       id: container

       SimpleRow {                         //actual content to be displayed in the list rows
         id: row
       }

       leftOption: SwipeButton {           //left options, displayed when swiped list row to the right
         text: "Option"
         iconType: IconType.gear
         height: row.height
         onClicked: {
           row.item.text = "Option clicked"
           row.itemChanged()
           container.hideOptions()         //hide automatically when button clicked
         }
       }

       rightOption: AppActivityIndicator { //right options, displayed when swiped list row to the left
         height: row.height
         width: height
       }
     } // SwipeOptionsContainer
   } // ListPage

 }

Property Documentation

hideOptionsOnClick : bool

If this is set, a click on this button will call hideOptions() of the containing SwipeOptionsContainer.

The default value is true.


Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded